0 votes
in JAVA by
What is the syntax for a method reference in Java 8?

a) (args) -> ClassName::methodName

b) ClassName::methodName(args)

c) (args) -> methodName::ClassName

d) methodName::ClassName(args)

1 Answer

0 votes
by

Answer: b) ClassName::methodName(args).

Explanation: Method references allow you to refer to an existing method as a lambda expression, without having to write out the full lambda syntax.

Related questions

0 votes
0 votes
asked May 2 in JAVA by Robin
0 votes
asked Apr 30 in JAVA by john ganales
...