We use analytics and advertising cookies to understand how the site is used and whether our ads on Facebook and Instagram work. They are set only if you accept. See our Privacy Policy for details.
Practice Kotlin and Android interview questions on null safety, sealed and data classes, scope functions, coroutines and Flow, ViewModel and lifecycle, Jetpack Compose state, inline and reified functions, and delegation.
Answer a real Kotlin & Android interview question before you browse the list. No signup needed.
nums = [1, 2, 2, 3]
for n in nums:
if n % 2 == 0:
nums.remove(n)
What is nums afterwards?
Practice in a session
10 questions from Kotlin & Android, one after another, then your score and streak.
Kotlin language fundamentals (null safety and smart casts, data and sealed classes, scope functions, extension functions), coroutines and structured concurrency, Flow and StateFlow, the Activity and Fragment lifecycle, ViewModel and SavedStateHandle across rotation and process death, and Jetpack Compose state, recomposition and side effects.
Expect questions on structured concurrency: how a failing child cancels its siblings, why viewModelScope work stops when the ViewModel is cleared, where a CoroutineExceptionHandler actually takes effect (root coroutines only), how coroutineScope differs from supervisorScope, and which dispatcher code resumes on. Flow questions cover cold vs hot flows, StateFlow vs SharedFlow replay, and operators like flatMapLatest and conflate.
Compose is now the default for new UI, so expect questions on state hoisting, remember and derivedStateOf, recomposition, and side-effect APIs such as LaunchedEffect, SideEffect and DisposableEffect. Many codebases still mix in Fragments and Views, so lifecycle questions (onPause vs onStop, viewLifecycleOwner) remain common.
A ViewModel survives a configuration change such as rotation because its store is retained, but it is destroyed when the system kills the process in the background. State that must survive process death belongs in SavedStateHandle (or onSaveInstanceState) for small UI state, or in persistent storage such as Room or DataStore for real data.
Null safety and platform types from Java interop, sealed classes with exhaustive when, data class equality and copy, scope functions (let, run, with, apply, also) and which use this vs it, extension functions being resolved statically, inline functions with reified type parameters, crossinline and noinline, generics variance and star projection, and property delegation with by lazy.