import java.io.File;
import java.io.IOException;
public class CreateFile {
public static void main(String[] args)
{
try{
File file = new File("MyFile.txt"); if (file.createNewFile())
{
System.out.println("Sucess");
}
else
{
System.out.println("Already exist..");
}
}
catch (IOException e)
{
}
}
}
No comments:
Post a Comment