A

Admin • 828.03K Points
Coach

Q. Which function gets the first element matching a condition?

  • (A) findFirst()
  • (B) matchFirst()
  • (C) firstOrNull()
  • (D) first()
  • Correct Answer - Option(C)
  • Views: 4
  • Filed under category Kotlin
  • Hashtags:

Explanation by: Admin
firstOrNull() returns the first matching element or null if none found.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.