Question 51

Given the code fragment:

What is the result?
  • Question 52

    Given the code fragment:

    Which code fragment, when inserted at line n1, enables the code to print /First.txt?
  • Question 53

    Given the definition of the Employee class:

    and this code fragment:

    What is the result?
  • Question 54

    Given the code fragment:
    List<String> colors = Arrays.asList("red", "green", "yellow");
    Predicate<String> test = n - > {
    System.out.println("Searching...");
    return n.contains("red");
    };
    colors.stream()
    .filter(c -> c.length() > 3)
    .allMatch(test);
    What is the result?
    Searching...
  • Question 55

    In 2015, daylight saving time in New York, USA, begins on March 8th at 2:00 AM. As a result, 2:00 AM becomes 3:00 AM.
    Given the code fragment:

    Which is the result?