A

Admin • 825.56K Points
Coach

Q. 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)
  • Correct Answer - Option(B)
  • Views: 9
  • Filed under category Java
  • Hashtags:

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

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.