/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author ICI Makati */ import java.io.*; public class CreateFile1 { /** * @param args the command line arguments */ 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"); } } }