A

Admin • 828.43K Points
Coach

Q. Which lambda expression can be used to check if a string is empty?

  • (A) s -> s.isEmpty()
  • (B) () -> isEmpty()
  • (C) s => s.empty()
  • (D) s -> s.size() == 0

Explanation by: Admin
The `isEmpty()` method checks for an empty string.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.