import java.io.File;资源:
import java.io.IOException;
public class CreateFile
{
public static void main( String[] args )
{
try {
File file = new File(c:\\nouveau_fichier.txt”);
if (file.createNewFile()){
System.out.println(文件已创建!”);
}else{
System.out.println(文件已存在.”);
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
Please disable your ad blocker and refresh the window to use this website.