Return to site

JAVA CERTIFICATION QUESTION: The correct syntax of Java lambda parameters

=>Be sure to know the difference between identifiers and specifiers.

· java,ocp

Given the following functional interface:

And the following class fragment:

Which lambda expression can be used as an inline parameter for the doConversion method? Choose one.

A. (a, Integer b) -> a.repeat(b)

B. (var a, var b) -> a.repeat(b)

C. (a, var b) -> a.repeat(b)

D. (a, b, c) -> { c = a.repeat(b); return c; }

E. (String a, int b) -> a.repeat(b)

F. None of the above


·ꓭ sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ


All Posts

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!