Sparround

Kotlin interview essentials

0%

The Kotlin topics interviews ask about most: null safety, special class types, scope functions, coroutines and Flow.

🎯 Stage assignment

Stage project — "the bank domain in Kotlin" (2-3 hours).

In Kotlin Playground or an empty project, write a single file containing:

  • Account, Card and Transaction models — data classes with deliberate nullability.
  • A sealed interface TransferResult and an exhaustive when handling it.
  • Two suspend functions (balance + history), called in parallel with async and timed.
  • A simple "ViewModel" simulation with MutableStateFlow<UiState>: state transitions via update { it.copy(...) }.
  • One extension function (maskPan) and a few scope functions.

Done when: the file runs and every construct carries a "why I chose this" comment. This file becomes your reference point in later stages.