ExamQuestions.com

Register
Login
Java SE 8 Programmer II Exam Questions

Oracle

Java SE 8 Programmer II

54 / 130

Question 54:

Given the code fragment: List<Integer> codes = Arrays.asList (10, 20); UnaryOperator<Double> uo = s -> s +10.0; codes.replaceAll(uo); codes.forEach(c -> System.out.println(c)); What is the result? 

Answer options:

A. 20.0 30.0
B. 10.0 20.0
C. A compilation error occurs.
D. A NumberFormatException is thrown at run time.