一个神奇的问题,有大神帮忙解释一波吗
代码:String strPath = "/test/";
System.out.println(strPath);
File file = new File(strPath);
System.out.println(file.getCanonicalPath().replaceAll("\\\\", "/"));
控制台输出:
/test/
/test2
2018-04-24 15:55
2018-04-25 09:34