public static void main(String[] args) throws IOException { // 都是输出C:\a.txt File f = new File("C:\\a.txt"); System.out.println(f); File f1 = new File("C:\\","a.txt"); System.out.println(f1); File f2 = new File(new File("C:\\"),"a.txt"); System.out.println(f2); }
标签:构造方法,System,File,println,new,txt,out From: https://www.cnblogs.com/weiduaini/p/17198348.html