阅读背景:

Java在类File中的相对路径

来源:互联网 

here is my code:

这是我的代码:

File file1 = new File("");
System.out.println(file1.exists()); // why the output is false?
System.out.println(file1.getAbsolutePath());

// assume that my current path is "d:/xxx/yyy"
File file2 = new File(".");
System.out.println(file2.getPath());   // i want to get ""
                                       // but i actually get ".", 
                                       // which is not i want.
                                       // so how can i get ""
File file1 = new F



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: