A

Admin • 828.03K Points
Coach

Q. What is the output of `Runnable r = () -> System.out.println("Hello"); r.run();`?

  • (A) Compilation error
  • (B) Hello
  • (C) null
  • (D) Nothing

Explanation by: Admin
This lambda prints 'Hello' when `run()` is invoked.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.