如程序:
String relPath = "C:/dafk/dfs/d";
relPath = relPath.replaceAll("/", "\\\\"); System.out.println(relPath);
为什么改成
relPath = relPath.replaceAll("/", "\\");救出错了呢?注:我需要的就是把/替换成\