Essay
import java.nio.file.*;
import java.nio.file.attribute.*;
import java.io.IOException;
public class PathDemo5
{
public static void main(String[] args)
{
Path myPath = Paths.get("C: \\Java\\Input.Output\\MyData.txt");
try
{
_______________________________________
System.out.println("Creation time " + attr.creationTime());
System.out.println("Last modified time " + attr.lastModifiedTime());
System.out.println("Size " + attr.size());
}
catch(IOException e)
{
System.out.println("IO Exception");
}
}
}
Using the above code, create a statement in the blank line provided that uses the readAttributes() method of the Files class that takes two arguments-the Path object created in the code and a BasicFileAttributes.class-and returns an instance of the BasicFileAttributes class named attr.
Correct Answer:

Verified
BasicFileAttributes ...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q16: Placing a file in the _ directory
Q31: Because the backslash character starts the escape
Q35: In random access files, records can be
Q39: Match each term with the correct statement
Q41: A(n) _ field is the field in
Q49: writer.write(names, 0, names.length()); <br>The above code represents
Q54: You can create a writeable file by
Q59: The String class _ method accepts an
Q67: You can use Java's _ class to
Q73: InputStream is a child of FileInputStream .