import java.io.File;
public class FileDemo {
public static void main(String[] args) {
File file = new File("d:");
System.out.println(file.getAbsolutePath());
file = new File("d:\\");
System.out.println(file.getAbsolutePath());
file = new File("c:");
System.out.println(file.getAbsolutePath());
}
}
//输出
d:\workspace\eclipse3.4_RCP\project_FileWatcher
d:\
c:\
希望知道为什么会出现这种情况