File类使用
import java.io.*;class FileDemo{public static void main(String[] args) throws IOException{File f1 = new File("c:\\qqqq.txt");File[] arr = File.listRoots();for(File f : arr){System.out.println(f);}//f.createNewFile();/*if(f.exists() ){if(f.isFile()){}else{}}*///System.out.println(f.isFile()+",,,"+f.isDirectory());//boolean b = f.exists();//System.out.println(b);//System.out.println(f.getAbsolutePath()+"....."+f.getPath());}}/*File(String p,String c){this(new File(p),c);}File(File p,String c){}String getAbsolutePath(){return "c:\\a.txt";}File getAbsoluteFile(){return new File(getAbsolutePath());}*/
?