Question 36

Given:
var data = new ArrayList<>();
data.add("Peter");
data.add(30);
data.add("Market Road");
data.set(1, 25);
data.remove(2);
data.set(3, 1000L);
System.out.print(data);
What is the output?
  • Question 37

    Given:
    String originalPath = "data\\projects\\a-project\\..\\..\\another-project"; Path path = Paths.get(originalPath); System.out.print(path.normalize()); What is the result?
  • Question 38

    Given:

    What is the result?
  • Question 39

    Given:

    Which annotation should be used to remove warnings from compilation?
  • Question 40

    Given the code fragment:

    What is the result?