Oracle
1Z0-819 · Question #50
1Z0-819 Question #50: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #50. The question stem and answer options stay visible for context.
Question
Given
var numbers = List.of(1,2,3,4,5,6,7,8,9,10);
for(int a: numbers){
StringBuilder sb = new StringBuilder();
sb.append(a);
sb.append("");
system.out.println(sb.toString());
}
Which statement on line 1 enables this code to compile?
Options
- AFunction<Integer, Integer> f = n -> n*2;
- BFunction<Integer> f = n -> n*2;
- CFunction<int> f = n -> n*2;
- DFunction<int,int> f = n -> n*2;
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.