java代码中 两种路径符号的写法_java文件路径符号
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |
java代码中 两种路径符号的写法
String path="D:\\新建文件夹\\2.png";
File file=new File(path);
System.out.println(file.exists());
String path1="D:/新建文件夹/2.png";
File file1=new File(path);
System.out.println(file1.getAbsolutePath());
System.out.println(file1.getCanonicalPath());
计算中默认的是 D:\aa\bb\ccc 这种形式
阿里云国内75折 回扣 微信号:monov8 |
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6 |