Given the code fragment: List<String> nL = Arrays.asList("Jim", "John", "Jeff"); Function<String, String> funVal = s -> "Hello : ".contact(s); nL.Stream() .map(funVal) .peek(System.out::print); What is the result?
Correct answer is C, since peek is an intermediate lazy operation which will not be evaluated unless the pipeline is ended with a terminating operation.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
speed045
Highly Voted 3 years, 8 months agoasdfjhfgjuaDCV
Most Recent 4 months, 3 weeks agosteefaand
5 months, 3 weeks agonikhil_3011
2 years, 6 months agoSvetleto13
3 years, 2 months agoayzo
3 years, 6 months agopridemore
3 years, 5 months agojohnchen88
4 years, 6 months agoInnovation
4 years, 6 months agoDestroyer
4 years, 7 months agoM_Jawad
4 years, 6 months agothetech
4 years, 8 months ago