Question 41

Given:

You want to obtain the Stream object on reading the file. Which code inserted on line 1 will accomplish this?
  • Question 42

    var numbers = List.of(0,1,2,3,4,5,6,7,8,9);
    You want to calculate the average of numbers. Which two codes will accomplish this? (Choose two.)
  • Question 43

    Given the code fragment:

    Which code fragment replaces the for statement?
  • Question 44

    Given:

    and:

    Which code, when inserted on line 10, prints the number of unique localities from the roster list?
  • Question 45

    Given:

    What is the result?