Question 36

Given the code fragment:

What is the result?
  • Question 37

    Given the code fragment:
    List<Integer> nums = Arrays.asList (10, 20, 8):
    System.out.println (
    //line n1
    );
    Which code fragment must be inserted at line n1 to enable the code to print the maximum number in the nums list?
  • Question 38

    Given:

    Which option fails?
  • Question 39

    Given the code fragment:

    Which two code fragments can be independently inserted at line n1 to enable the code to print the elements of the array in reverse order?
  • Question 40

    Given:

    And given the code fragment:

    What is the result?