OCA Wrong Answer - Test 5 Question 33
Posted: Wed Nov 13, 2024 11:27 am
While answering questions for OCP cert came across this question:
The correct answer was :
But on my machine (eclipse Ide, jdk13) i get this:
Makes sense to me. Am I doing something wrong?
Code: Select all
What will the following code fragment print?
Path p1 = Paths.get("c:\\personal\\.\\photos\\..\\readme.txt");
Path p2 = Paths.get("c:\\personal\\index.html");
Path p3 = p1.relativize(p2);
System.out.println(p3);
Code: Select all
..\..\..\..\index.html
Code: Select all
..\index.html