首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Java获取资料列表怪状

2012-10-25 
Java获取文件列表怪状File file new File(path)if (file.isDirectory() && file.exists()) {String[] f

Java获取文件列表怪状

File file = new File(path);if (file.isDirectory() && file.exists()) {String[] files = file.list();for (String string : files) {updateObject = new UpdateObject();updateObject.setName(string);System.out.println(file.getPath() + "/" + string);


结果是这样的:
D:\F\work\java\Workspaces\Happy\xhsd_hprose\WebRoot\WEB-INF\classes\pda/xhsd - Copy (2).exeD:\F\work\java\Workspaces\Happy\xhsd_hprose\WebRoot\WEB-INF\classes\pda/xhsd - Copy (3).exeD:\F\work\java\Workspaces\Happy\xhsd_hprose\WebRoot\WEB-INF\classes\pda/xhsd - Copy.exeD:\F\work\java\Workspaces\Happy\xhsd_hprose\WebRoot\WEB-INF\classes\pda/xhsd.exe


再次测试:
OK啦

热点排行