Solved

Complete the Following Code Snippet That Returns a List of the First

Question 19

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions