Java examples for File Path IO:File Operation
To create a File object, you call the File constructor, passing a string representing the filename of the file as a parameter.
For example:
import java.io.File; public class Main { public static void main(String[] arg) { File f = new File("myfile.txt"); }/*from w w w .j av a 2 s. c o m*/ }