File Class File class is used to display the property of file, to check the file existence, writable, readable, to rename the file‌‌ File f = new File (file-name); // create a file object f.exists(); // check existence f.canRead( ); // check readable f.canWrite( ); // check writable f.isfile( ); // check if is a file