Java I/O³£ÓÃÁ÷ʾÀý
package io;
import java.io.*;
/**
* @author ¸ßÕíÎâÓÇ
* ÀûÓûº³åÇøÔÀí,BufferedInputStream,
* ʵÏÖµÄÎļþ×Ö½ÚÁ÷¶ÁÈ¡¹¦ÄÜʾ·¶
*
*/
public class BufferedInOutputStream {
public BufferedInOutputStream() {
ioTest2();
}
public void ioTest2() {
FileInputStream in = null ;
BufferedInputStream bi = null;
int i= 0;
int count=0;
try{
in = new FileInputStream("D:/j/o/java2.txt");
bi = new BufferedInputStream(in);
while(( i=bi.read())!=-1) {
System.out.print((char)i);
count++;
}
System.out.println(count);
in.close();
bi.close();
}catch (IOException e){
e.printStackTrace();
}
}
public static void main(String[] args) {
new BufferedInOutputStream();
}
}
----------------------------------
package io;
import java.io.*;
/**
* @author Owner ÀûÓûº³åÇøÔÀí,BufferedInputStr
Ïà¹ØÎĵµ£º
Myeclipse±¨Could not create Java VM
»·¾³£º
Myeclipse6.0£¬tomcat6.0, 2GÄÚ´æ
½ñÌìһֱʹÓÃDEBUGģʽÆô¶¯tomcatÒ»Ö±ºÜÂý£¬ËùÒÔÏëʹÓÃRUNģʽÀ´Æô¶¯£¬µ«ÊÇÿ´ÎÆô¶¯¶¼±¨´í“could not create the java virtual machine”£¬ÌáʾÉèÖÃÄÚ´æ²»×㣬°Ù¶ÈÏ£¬¶¼ÒªÇóÐÞ¸Äeclipse.iniÅäÖÃÎļþ£¬µ«ÊÇÐÞ¸ÄÁ˲»ºÃÊ ......
public class DealLockTest implements Runnable {
static String i = new String();
static String j = new String();
private String str = null;
public DealLockTest(String str) {
this.str = str;
}
public static void main(String[] args) {
new Thread(new DealLockTest("i")).start( ......
¿´¿´ÏÂÃæ³ÌÐò½«Êä³öʲô½á¹û£º
/**
* ShowExtending
* ÑÝʾ¼Ì³ÐʱµÄÏÖÏó
*/
class SupCls {
static String s1 = "¸¸ÀàÀà±äÁ¿s1";
String s2 = "¸¸ÀàʵÀý±äÁ¿s2";
SupCls(){
System.out.println("¸¸À๹ÔìÆ÷±»·ÃÎÊ");
}
public static void f1(){
......
»¨ÁËÁ½Ììʱ¼ä£¬ÖÕÓÚ°ÑaccessÊý¾Ý¿âÀïµÄÊý¾Ý»»µ½OracleÁË¡£µ±È»ÕâÆäÖÐÒª¸ÐлͬѧºÍ²©ÓѵÄÈÈÐİïÖúÀ¡£ÏÖ½«½ñÌìµÄÊÕ»ñÕûÀíÏ¡£
ÎÒÓõÄÊÇOracle 10 express edition°æ±¾£¬Õâ¸ö°æ±¾½¨Êý¾Ý¿âͦÂé·³µÄ£¬ËùÒÔÎÒ¾ÍÖ±½ÓÔÚËü×Ô´øµÄÊý¾Ý¿âXEϽ¨±íÁË¡£
×¢Ò⣺½¨±í¿ÉÒ»¶¨Òª ......
¸Õ¸ÕÔËÐÐjava HelloWorld.class£¬ÀÏÊÇ˵£º
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/class
Caused by: java.lang.ClassNotFoundException: HelloWorld.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
  ......