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

1 Expert Approved Answer
Step: 1 Unlock

import javatextSimpleDateFormat import javautilDate import javaioFile displa... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!