Kotlin - Collections Fundamentals
Which Kotlin function checks if a collection has no elements?
isEmpty()isNotEmpty() checks for one or more elements, count() and size return the number of elements but do not return a boolean.isEmpty() -> Option DisEmpty() = true [OK]isEmpty() to check for no elements [OK]isEmpty() with isNotEmpty()count() to check emptinesssize() as a function instead of property15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions