Question: Write an application that displays the name, containing folder, size, and time of last modification for the file FileStatistics.java . ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- import java.nio.file.*; import java.nio.file.attribute.*;
Write an application that displays the name, containing folder, size, and time of last modification for the file FileStatistics.java.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
import java.nio.file.*;
import java.nio.file.attribute.*;
import java.io.IOException;
public class FileStatistics {
public static void main(String[] args) {
Path file = Paths.get("/root/sandbox/FileStatistics.java");
// Write your code here
}
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Example output:
File name is FileStatistics.java
Folder name is sandbox
File\'s size is 884
File\'s creation time is 2018-05-30T16:28:01.410343Z
Step by Step Solution
3.41 Rating (145 Votes )
There are 3 Steps involved in it
import javatextSimpleDateFormat import javautilDate import javaioFile displa... View full answer
Get step-by-step solutions from verified subject matter experts
