This form creates a new File instance from a parent abstract pathname and a child pathname
string.
For Example:File file1 = new File(file1,"/classes");
13.2.1 Method of File Class
The frequently used methods of Fileclass are given in Table 13.1:
Method SignatureDescription
boolean canRead()
Tests whether the application can read the file denoted by this abstract
pathname
boolean CanWrite()
Tests whether the application can modify the file denoted by this
abstract pathname
boolean
createNewFile()
Automatically creates a new, empty file named by this abstract ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.