Question 101

Given:

It is required that if p instanceof Pair then p.isValid() returns true.
Which is the smallest set of visibility changes to insure this requirement is met?
  • Question 102

    Given the code fragment:

    Which code fragment replaces the for statement?
  • Question 103

    Which describes a characteristic of setting up the Java development environment?
  • Question 104

    Given:

    Which statement on line 1 enables this code to compile?
  • Question 105

    Given the code fragment:
    List<Integer> list = List.of(11,12,13,12,13);
    Which statement causes a compile time error?