Create a file in Java
The File class has three constructors and a number of useful methods. The following are the three constructors:
Use File.createNewFile() method to create a file. This method returns a boolean value : true if the file is created successfully in the path specified; false if the file is already exists or the program failed for some reason.