ExamQuestions.com

Register
Login
Java SE 8 Programmer II Exam Questions

Oracle

Java SE 8 Programmer II

11 / 130

Question 11:

Given the code fragment: Stream<List<String>> iStr= Stream.of ( Arrays.asList ("1", "John"), Arrays.asList ("2", null)); Stream<<String> nInSt = iStr.flatMapToInt ((x) -> x.stream ()); nInSt.forEach (System.out :: print); What is the result? 

Answer options:

A. 1John2null
B. 12
C. A NullPointerException is thrown at run time.
D. A compilation error occurs.