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.

What will be an ideal response?

Path fullPath = inputPath.toAbsolutePath();

Computer Science & Information Technology

You might also like to view...

Echo error rarely occurs at junctions where wires are connected.?

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The Color Sampler tool lets you store up to four distinct color samplers.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology