import java.io.*; public class CreateFile1{ public static void main(String[] args) throws IOException{ File f; f=new File("myfile.txt"); if(!f.exists()){ f.createNewFile(); System.out.println("New file \"myfile.txt\" has been created to the current directory"); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)