nerdexam
Oracle

1Z0-809 · Question #249

Given the code fragment: //line n1 double d = str.average().getAsDouble(); System.out.println("Average = " + d); Which should be inserted into line n1 to print Average = 2.5?

The correct answer is C. DoubleStream str = Stream.of(1.0, 2.0, 3.0, 4.0). You've hit your session limit · resets 5:20pm (America/New_York)

Question

Given the code fragment: //line n1 double d = str.average().getAsDouble(); System.out.println("Average = " + d); Which should be inserted into line n1 to print Average = 2.5?

Options

  • AIntStream str = Stream.of(1, 2, 3, 4);
  • BIntStream str = IntStream.of(1, 2, 3, 4);
  • CDoubleStream str = Stream.of(1.0, 2.0, 3.0, 4.0);
  • DStream str = Stream.of(1, 2, 3, 4);

How the community answered

(42 responses)
  • A
    7% (3)
  • B
    12% (5)
  • C
    79% (33)
  • D
    2% (1)

Explanation

You've hit your session limit · resets 5:20pm (America/New_York)

Community Discussion

No community discussion yet for this question.

Full 1Z0-809 Practice