摘要:
1.文件类 *创建File类对象 File f; f = new File ("a.java"); f = new File ("C:\\nie\\","a.java"); *File类提供了实现目录管理功能的方法 File path = new File("C:\\nie\\"); File f 阅读全文
摘要:
1.InputStream类 read()方法,逐字地以二进制的原始方法读取数据 public int read(); //读入一个字节,-1表示无 public int read(bytr b[]); //返回读入的字节数 2.OutputStream类 write()方法,是将字节写入流中 pu 阅读全文
摘要:
1.多线程同步 class SyncCounter1{ public static void main(String[] args){ Num num = new Num(); Thread counter1 = new Counter(num); Thread counter2 = new Cou 阅读全文
摘要:
1.java中的线程 线程:程序中单个顺序的流程控制 2.线程体 run方法来实现 3.创建线程的两种方法 *继承Thread类创建线程 public class TestThread1 { public static void main(String args[]){ Thread t = new 阅读全文