Creating a File
Code

package ch4_package;
import java.io.*;
public class Test_This {
public static void main(String[] args) throws IOException
{
// TODO Auto-generated method stub
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String str ="";
Process pp = new Process();
try{
//System.out.println("---While Loop---");
System.out.print("Please Enter a File name: ");
str = br.readLine();
pp.process(str);
}//try
catch(NumberFormatException e)
{ System.out.println("data was blank");}
}
}
class Process {
public void process(String str)
{
try {
File file = new File(str);
// Create file if it does not exist
boolean success = file.createNewFile();
if (success) {
System.out.println("File " + str + " has : been created");
} else {
System.out.println("File " + str + "already exists");
}
} catch (IOException e) {
}
}
}

Here I am using eclipse.

Now file is created

note the file_1.txt is created