R

Ram Sharma • 3.40K Points
Extraordinary

Q. What does `dropWhile()` do in Java 9+?

  • (A) Drops all matching elements
  • (B) Drops elements until predicate returns false
  • (C) Drops none
  • (D) Skips the last matching element
  • Correct Answer - Option(B)
  • Views: 11
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`dropWhile()` skips elements until the predicate returns false, then returns the rest.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.