A

Admin • 833.24K Points
Coach

Q. Which method returns true if the stream contains no elements?

  • (A) isEmpty()
  • (B) noneMatch(x -> true)
  • (C) count() == 0
  • (D) Both b and c

Explanation by: Admin

`noneMatch(x -> true)` and `count() == 0` both indicate an empty stream.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.