ExamQuestions.com

Register
Login
Java SE 8 Programmer II Exam Questions

Oracle

Java SE 8 Programmer II

100 / 130

Question 100:

Given the code fragment: 
image
Which code fragment, when inserted at line n1, enables the code to print /First.txt? 

Answer options:

A. Path iP = new Paths ("/First.txt");
B. Path iP = Paths.toPath ("/First.txt");
C. Path iP = new Path ("/First.txt");
D. Path iP = Paths.get ("/", "First.txt");