Solved

Import Java.util.Scanner; Import Java.nio.file.*;

Question 72

Essay

import java.util.Scanner;
import java.nio.file.*;
public class PathDemo2
{
    public static void main(String[] args)
    {
       String name;
       Scanner keyboard = new Scanner(System.in);
       System.out.print("Enter a file name >> ");
       name = keyboard.nextLine();
       Path inputPath = Paths.get(name);
       ------- Code here -----
       System.out.println("Full path is " + fullPath.toString());
    }
}
Using the above code, add a statement on the indicated line that creates an absolute path by assigning the file to the current directory.

Correct Answer:

verifed

Verified

Path fullP...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents