Files Last Modified Time

# Introduction Java provides several built-in methods such as `lastModified()` and `getLastModifiedTime()` to get the file's last updated time. We can use either the `File` class of **java.io** package or `Files` class of **java.nio** package to retrieve the last modified time of a file. In this lab, we will use the `lastModified()` method of the `java.io.File` class and the `getLastModifiedTime()` method of the `java.nio.Files` class to get the last updated time of a file.

|60 : 00

Click the virtual machine below to start practicing