1Z0-830 Web TestEngine demo

Exit VCEDump 1Z0-830 Java SE 21 Developer Professional
Question 15 of 15
0% complete
Q15 Single choice

Given:

java

interface Calculable {

long calculate(int i);

}

public class Test {

public static void main(String[] args) {

Calculable c1 = i -> i + 1; // Line 1

Calculable c2 = i -> Long.valueOf(i); // Line 2

Calculable c3 = i -> { throw new ArithmeticException(); }; // Line 3 }

}

Which lines fail to compile?

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in