file in Java

The File class is used to read information about existing files and directories, list the contents of a directory, and create/delete files and directories.
The following code creates a File object,
```
File file = new File("/home/smith/data/zoo.txt");
```
<b>Common File Methods</b>
Method Name | Description
----- | -----
exists() | Returns true if the file or directory exists.
getName() | Returns the name of the file or directory denoted by this path.
getAbsolutePath() | Returns the absolute pathname string of this path.
isDirectory() | Returns true if the file denoted by this path is a directory.
isFile() | Returns true if the file denoted by this path is a file.
length() | Returns the number of bytes in the file. For performance reasons, the file system may allocate more bytes on disk than the file actually uses.
lastModified() | Returns the number of milliseconds since the epoch when the file was last modified.
delete() | Deletes the file or directory. If this pathname denotes a directory, then the directory must be empty in order to be deleted.
renameTo(File) | Renames the file denoted by this path.
mkdir() | Creates the directory named by this path.
mkdirs() | Creates the directory named by this path including any nonexistent parent directories.
getParent() | Returns the abstract pathname of this abstract pathname’s parent or null if this pathname does not name a parent directory.
listFiles() | Returns a File[] array denoting the files in the directory.