Multiple Choice
Complete the following code snippet that returns a list of the first ten prime numbers, assuming that primes is an infinite Integer stream of prime numbers.
List<Integer> first10primes = primes
________________________________
.collect(Collectors.toList() ) ;
A) .limit(10)
B) .count(10)
C) .skip(10)
D) .filter(10)
Correct Answer:

Verified
Correct Answer:
Verified
Q14: Which method yields a stream obtained by
Q15: Complete the following code snippet that counts
Q16: Complete the following code snippet that removes
Q17: Which method yields a stream of all
Q18: Which lambda expression represents a function that
Q20: What is the type returned by the
Q21: Complete the following code snippet that returns
Q22: You want to save stream values in
Q23: Complete the following statement that finds the
Q24: Complete the following code snippet to determine