Question 11

The protected modifier on a Field declaration within a public class means that the field
______________.
  • Question 12

    Given the code fragment:
    List<Integer> list1 = Arrays.asList(10, 20);
    List<Integer> list2 = Arrays.asList(15, 30);
    //line n1
    Which code fragment, when inserted at line n1, prints 10 20 15 30?
  • Question 13

    Given the code fragment:

    Which three code fragments can be independently inserted at line n1 to enable the code to print one?
  • Question 14

    Given the code fragment:

    What is the result?
  • Question 15

    Given the class definitions:

    And the code fragment of the main() method,

    What is the result?