【发布时间】:2014-08-27 23:14:23
【问题描述】:
在java文档中关于
File#getPath()
写道:
Converts this abstract pathname into a pathname string.
我试着写1
File file3 = new File("D:\\work");
System.out.println(file3.getPath());
在 cmd 我看到D:\\work
我试着写2:
File file4= new File("file4");
System.out.println(file4.getPath());
在 cmd 我看到:
file4
所以我有一个问题:
有什么区别
抽象路径名
和
路径名字符串
?
【问题讨论】:
-
"abstract pathname" 是“
Fileobject”的一种奇特方式