File f = new File("D:\\All"); //new一个f对象,输入要查找的文件
if (f.exists()) { //判断文件是否存在
System.out.println("exist"); //存在输出"exist"
} else {
System.out.println("not exist"); //不存在输出"not exist"
}
File f = new File("D:\\All"); //new一个f对象,输入要查找的文件
if (f.exists()) { //判断文件是否存在
System.out.println("exist"); //存在输出"exist"
} else {
System.out.println("not exist"); //不存在输出"not exist"
}