Given the code fragment:
Which should be inserted into line n1 to print Average = 2.5?
IntStream str = Stream.of (1, 2, 3, 4);
IntStream str = IntStream.of (1, 2, 3, 4);
DoubleStream str = Stream.of (1.0, 2.0, 3.0, 4.0);
Stream str = Stream.of (1, 2, 3, 4);
Submit