What is the result?

Given:
String originalPath = "data\projects\a-project\..\..\another-project";
Path path = Paths.get(originalPath); System.out.print(path.normalize());
What is the result?
A. dataanother-project
B. dataprojectsa-projectanother-project
C. data\projects\a-project\..\..\another-project
D. dataprojectsa-project….another-project

Download Printable PDF. VALID exam to help you PASS.

4 thoughts on “What is the result?

  1. public static void main(String[] args) {
    String originalPath = “data\\projects\\a-project\\..\\..\\another-project”;
    Path path = Paths.get(originalPath);
    System.out.print(path.normalize());
    }

    > data\another-project

    20

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.