Creating A File
      This program creates a File and if it does not exists already.
/*
	http://www.ProbCOMP.com	

	This program creates a File and if it does not exists already.

*/

import java.io.File;
import java.io.IOException;

public class CreateFile {
	 public static void main(String[] args){

		File file = new File(args[0]);
		boolean create = false;

        try 
		{
            create = file.createNewFile();
        } catch (IOException e) {
            e.printStackTrace();
        }

        if (create) 
		{
            System.out.println("File created");
        } 
		else 
		{
            System.out.println("File already exists");
        }

	}
}
									

Download Program
Did You Know ?
IP address is a numerical label that is assigned to devices participating in a computer network. Read More