Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File file = new File("c:\\newfile.txt");
- if (file.createNewFile()){
- System.out.println("File is created!");
- }else{
- System.out.println("File already exists.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement