Question: Create a new file named C:JavaChapter.13ThisIsATest.txt Then write a Java application that displays the files name, containing folder, size, and time of last modification. Must

Create a new file named C:\\Java\\Chapter.13\\ThisIsATest.txt

Then write a Java application that displays the files name, containing folder, size, and time of last modification.

Must use/finish the Java code below.

---------------------------------------------------------------------------------------------------------------------------

//Write application that displays files name contining foldr, size, time of last modification 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("C:\\Java\\Chapter.13\\ThisIsATest.txt"); try { // try block to declare count and then display path, file name and folder name p.604 // declare a BasicFileAttributes object, then add statements to display the file's size and creation time } // catch block that catches potenial IOException thrown catch(IOException e) { // add display IOException } } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!