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...

That part of a program where a particular declaration of a word provides its meaning is called the ____ of that declaration.

A. scope B. duration C. lifetime D. access level

Computer Science & Information Technology

________ is the name given to a PC that has been modified so OS X can be run on it

Fill in the blank(s) with correct word

Computer Science & Information Technology

The scale of a file inserted as a watermark can be changed

Indicate whether the statement is true or false

Computer Science & Information Technology

Case-Based Critical Thinking QuestionsCase 6-1The professor in Melissa's class has all of the students take turns teaching a mini-lesson to the other students as a way of reinforcing their own understanding of the concept that they have been assigned to teach. Melissa is nervous, because she was assigned the topic of all of the methods that are available for showing Project 2010 information with other programs, and she knows there a lot of options available.Which of the following can Melissa use as an example of embedding?

A. connecting an Excel file into your Project file so that changes made to the original file are dynamically updated in Project B. inserting a graph from Excel into a Project file, so the actual graph is stored in the Project 2010 file C. duplicating data from a cost sheet in Project 2010 and inserting it at a specific location in an Excel worksheet D. bringing Outlook task lists into a project file

Computer Science & Information Technology