All quizzes
Free quiz · 50 questions in the bank

Kotlin quiz

Test your Kotlin knowledge with a free interactive quiz — 50 questions with answers and explanations. No signup needed to play.

Question 1/5Score 0

Why must Kotlin classes be marked `open` to allow inheritance?

Questions in this quiz
  1. Why must Kotlin classes be marked `open` to allow inheritance?
  2. What is an `init` block?
  3. What does `val ages = users.map { it.age }` produce?
  4. What does the safe-call operator `?.` do?
  5. What is the difference between `List` and `MutableList`?
  6. What is an extension function?
  7. Which loop iterates over a range of integers `1..10`?
  8. What does `object MyService { … }` declare?
  9. What is the difference between `==` and `===` in Kotlin?
  10. Are `String` template expressions evaluated at compile time?
  11. Why does this fail to compile: `var name: String = null`?
  12. Which auto-generated members does `data class` provide?
Gaps to close?
Read the curated Kotlin notes — core concepts, patterns, interview prep.
Kotlin notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web