java.io.File
- Platform independent definition of file and directory names.
- Has methods to operate and query files and directories.
- Constants to represent platform separators:
- Creating a new File Object :
File myFile
myFile = new File(“test.dat”);
myFile = new File(“/”, “test.dat”);
File myDir = new File(“/”); myFile = new File(myDir, “test.dat”);