← All interview questions

Skill Zuno · skillzunos.com · Fullstack

Kotlin interview questions

Prepare for Kotlin interviews on Skill Zuno. This practice book covers Kotlin interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.

Open Kotlin on Skill Zuno

Also see the Kotlin tutorial.

Kotlin is a statically typed JVM language from JetBrains and Google's preferred language for Android. It interoperates fully with Java while adding null safety, data classes, extension functions and coroutines. Kotlin interviews test null safety, data and sealed classes, scope functions and coroutines.

Sample Kotlin interview questions

How does Kotlin prevent NullPointerException?

Types are non-nullable by default; String? is a separate nullable type. The compiler forces you to handle null with a safe call (?.), the Elvis operator (?:) or a check before use. Only !! or Java interop can still throw.

What does a data class generate?

equals(), hashCode(), toString(), copy() and componentN() functions for destructuring, all based on the properties in the primary constructor.

What is a sealed class?

A sealed class has a fixed set of subclasses known at compile time. A when expression over it can be exhaustive without an else branch, which makes it a good fit for UI states and results.

What is the difference between let and apply?

let passes the object as it and returns the lambda's result, so it suits null checks and transformations. apply uses the object as this and returns the object itself, so it suits configuring a new instance.

How are coroutines different from threads?

Coroutines are lightweight tasks that suspend instead of blocking, so thousands can share a few threads. They run inside a CoroutineScope, and structured concurrency cancels child coroutines when the parent is cancelled.

What you can practice

  • Kotlin interview questions for beginners and experienced developers
  • Level-based practice: New, Easy, Medium, Hard, and Diff
  • Fullstack topics alongside Kotlin on skillzunos.com

More Fullstack interview questions

All interview questions