ExamQuestions.com

Register
Login
Java SE 8 Programmer II Exam Questions

Oracle

Java SE 8 Programmer II

115 / 130

Question 115:

Given the code fragment: 
image
Which modification enables the code to print Price 5 New Price 4? 

Answer options:

A. Replace line n2 with .map (n -> System.out.println ("New Price" + n ""1)) and remove line n3
B. Replace line n2 with .mapToInt (n -> n "" 1);
C. Replace line n1 with .forEach (e -> System.out.print ("Price" + e))
D. Replace line n3 with .forEach (n -> System.out.println ("New Price" + n));