Kotlin Developer Interview Questions (2026) and How to Answer
By FindAJobAI Team Updated How we wrote this page
Kotlin developer interviews usually test language fundamentals (null safety, data and sealed classes, extension functions), coroutines and Flow, and then the platform the role uses: Jetpack Compose and the Android lifecycle, or Spring Boot and Ktor on the server. Expect a live coding task in Kotlin and a design discussion about a feature or service.
Interviewers look for idiomatic, readable Kotlin and careful handling of concurrency, cancellation and state.
Below: 30 questions with what each one really asks and an answer outline, full sample answers to the 10 most asked, red flags to avoid and a 7-day plan.
Answering with STAR
Tell each story in four steps: the situation in a sentence, your task, the actions you took (most of the answer) and the result, with a number if you have one. Aim for about two minutes; the outlines show what to include, the details must be yours.
Behavioural questions (1–10)
How you've handled real situations. Answer each with one true story, in STAR order.
1.Tell me about a time you fixed a crash-prone part of a Kotlin app.
What they're really asking: Can you track down and remove a source of instability?
Answer outline (STAR)
- SituationA transfers flow that produced most of an Android banking app's crash reports.
- TaskBring the crash rate down without pausing feature work.
- ActionRebuilt the flow in Compose with one state holder per screen and replaced RxJava chains with lifecycle-aware coroutines.
- ResultThe crash-free session rate rose from 98.6% to 99.8% after release.
Full sample answer (fictional example)
At the bank, the transfers flow caused most of our crash reports. It mixed XML layouts, RxJava chains and callbacks, and many crashes came from work finishing after the screen was gone. I rebuilt the flow in Jetpack Compose with one state holder per screen, and replaced the RxJava code with coroutines launched in viewModelScope, so leaving the screen cancelled the work. I shipped it behind a feature flag to a small share of users first and watched Crashlytics closely. The crash-free session rate went from 98.6% to 99.8%, and support tickets about failed transfers fell too.
2.Describe a Java to Kotlin migration you worked on.
What they're really asking: Can you migrate a codebase gradually and safely?
Answer outline (STAR)
- SituationA claims service written in Java with frequent null-pointer errors in production.
- TaskMove it to Kotlin while releases continued every week.
- ActionConverted classes in small pull requests, starting with data models, and added tests around each converted area.
- ResultNull-pointer incidents fell sharply, and the team writes all new code in Kotlin.
Full sample answer (fictional example)
I led the move of our claims service from Java to Kotlin. We agreed early not to freeze features, so I converted classes in small pull requests, starting with data models because data classes and null safety gave the quickest wins. Before converting each area, I made sure it had tests, and I added nullability annotations at the Java boundary so the remaining Java code passed clear types. It took about two quarters. Null-pointer incidents in production dropped sharply, and the team now writes all new code in Kotlin.
3.Tell me about a time a release went wrong.
What they're really asking: How do you react when users are affected?
Answer outline (STAR)
- SituationA new build caused a startup crash on one manufacturer's phones.
- TaskLimit the damage and ship a fix quickly.
- ActionHalted the staged rollout at five percent, reproduced the crash on a borrowed device and found an SDK initialization race.
- ResultA fixed build shipped the next day, and device-specific test runs were added to CI.
Full sample answer (fictional example)
We released a build that crashed at startup on one manufacturer's phones, which we did not have in our test set. Because we used staged rollouts, I saw the crash spike in Crashlytics at five percent and halted the rollout right away. I borrowed a matching phone from a colleague and reproduced it within an hour. It was a race in a third-party SDK's initialization that only appeared with that maker's background restrictions. I moved the initialization later, shipped a fix the next day and added that device family to our cloud test runs.
4.Tell me about a disagreement over app architecture.
What they're really asking: Can you argue for a design with evidence and then commit?
Answer outline (STAR)
- SituationA debate over whether to adopt a single-activity architecture with Compose navigation.
- TaskSettle the navigation approach with evidence everyone accepted.
- ActionBuilt a small spike of both approaches on one feature and compared code size, test effort and back-stack bugs.
- ResultThe team chose the single-activity approach, and back-stack bugs dropped in the next quarter.
5.Describe a time you helped another developer learn Kotlin.
What they're really asking: Do you share knowledge and spot habits from other languages?
Answer outline (STAR)
- SituationA Java developer whose Kotlin code used nullable types and double-bang operators everywhere.
- TaskHelp them write safer, idiomatic code quickly.
- ActionPaired on two features, showed safe calls, let and sealed results, and wrote a short style note with examples.
- ResultTheir pull requests needed fewer review rounds within a month.
6.Tell me about a time you made an app start faster.
What they're really asking: Do you measure and improve startup performance?
Answer outline (STAR)
- SituationCold start on mid-range phones took almost three seconds, and reviews mentioned it.
- TaskCut startup time noticeably without removing features.
- ActionProfiled startup, deferred heavy SDK setup, made dependency injection lazy and added baseline profiles.
- ResultCold start dropped to about 1.4 seconds, and the complaints faded from reviews.
Full sample answer (fictional example)
Our cold start on mid-range phones was close to three seconds, and app reviews had started to mention it. I profiled startup with Android Studio and Macrobenchmark and found that several SDKs initialized on the main thread before the first frame. I moved analytics and remote config setup to after the first screen appeared, made heavy dependency injection bindings lazy, and added baseline profiles so key code paths were compiled ahead of time. Cold start dropped to about 1.4 seconds, and the startup complaints faded from reviews.
7.Describe a time you worked with an iOS team on shared logic.
What they're really asking: Can you work well with engineers on other platforms?
Answer outline (STAR)
- SituationAndroid and iOS formatted currency amounts differently, confusing users who used both.
- TaskMake both apps behave the same way.
- ActionBuilt a small Kotlin Multiplatform module for formatting and validation, and asked an iOS engineer to co-own it.
- ResultFormatting bugs dropped to almost none, and the iOS team started proposing additions themselves.
8.Tell me about a time you had to deliver under a tight deadline.
What they're really asking: Do you trade features rather than stability when time runs short?
Answer outline (STAR)
- SituationA partner feature needed to ship before a marketing launch in three weeks.
- TaskRelease a stable first version on time.
- ActionAgreed the essential screens with product, built them with tests, and moved animations to a later release.
- ResultThe feature launched on schedule with no crash spike, and the extras followed two weeks later.
9.Describe a time you improved build times for your team.
What they're really asking: Do you care about developer productivity?
Answer outline (STAR)
- SituationIncremental builds took about four minutes, and developers avoided running tests locally.
- TaskSpeed up builds without disrupting ongoing work.
- ActionSplit the app into feature modules, enabled build caching and removed annotation processors where possible.
- ResultIncremental builds fell to under a minute, and local test runs became routine.
10.Tell me about a bug that taught you something about coroutines.
What they're really asking: Do you learn from concurrency mistakes?
Answer outline (STAR)
- SituationA search screen showed old results when users typed quickly.
- TaskFind out why stale results won the race.
- ActionTraced it to several parallel requests finishing out of order and switched to flatMapLatest so older searches were cancelled.
- ResultThe bug disappeared, and I now default to cancelling superseded work.
Technical and role-skill questions (11–22)
Can you do the work itself? Think out loud and name the trade-offs.
11.How does null safety work in Kotlin?
What they're really asking: The language feature that most changes how Kotlin code is written.
Answer outline
- Types are non-null by default, and a nullable type must be marked with a question mark.
- The compiler forces you to handle nulls with safe calls, the Elvis operator or explicit checks, which removes most null-pointer errors.
Full sample answer (fictional example)
In Kotlin, types are non-null unless you mark them with a question mark, so a String can never hold null but a String with a question mark can. The compiler then makes me deal with the nullable case, using a safe call, the Elvis operator for a default, or a check that smart-casts the value. That moves a whole category of bugs from runtime to compile time. The weak spot is Java interop, where types come in as platform types, so I add checks or annotations at those boundaries.
12.What is structured concurrency in Kotlin coroutines?
What they're really asking: Do you understand how coroutine lifetimes are managed?
Answer outline
- Every coroutine runs in a scope, and a parent waits for its children and cancels them if it fails or is cancelled.
- This prevents leaked work, such as network calls that continue after a screen is closed.
Full sample answer (fictional example)
Structured concurrency means every coroutine belongs to a scope, and the scope controls its lifetime. A parent coroutine does not finish until its children do, and if the parent is cancelled or a child fails, the rest are cancelled too. On Android I rely on this through viewModelScope, so leaving a screen cancels its network calls automatically. On the server, I use coroutineScope inside a request so parallel calls stop if one fails. It is the reason I avoid GlobalScope, which breaks that chain and makes leaks easy.
13.What is the difference between launch and async?
What they're really asking: Do you know the basic coroutine builders?
Answer outline
- launch starts a coroutine that returns a Job and is used for work with no result.
- async returns a Deferred that you await for a result, which is useful for running independent calls in parallel.
14.What are sealed classes, and when would you use them?
What they're really asking: Can you model state safely with the type system?
Answer outline
- A sealed class restricts which subclasses exist, so the compiler knows every possible case.
- They suit screen states or results, because a when expression over them must handle every case.
Full sample answer (fictional example)
A sealed class limits its subclasses to those declared in the same module, so the compiler knows every possible case. I use them for screen state, for example Loading, Success with data, and Error with a message. When I handle the state with a when expression, the compiler tells me if I forgot a case, which is very useful when someone adds a new state later. I also use them for results from repositories, which makes error handling explicit instead of relying on exceptions everywhere.
15.How do Dispatchers.Main, IO and Default differ?
What they're really asking: Do you put work on the right threads?
Answer outline
- Main runs on the UI thread, IO suits blocking disk and network calls, and Default suits CPU-heavy work.
- Switch with withContext so callers do not need to know which thread a function uses.
16.What is the difference between a cold Flow and StateFlow?
What they're really asking: Do you know how Kotlin's reactive streams behave?
Answer outline
- A cold Flow starts producing values for each collector when collection begins.
- StateFlow is hot, always holds a current value and shares it with all collectors, which suits UI state.
Full sample answer (fictional example)
A cold Flow does nothing until someone collects it, and each collector gets its own run of the producer, much like calling a function again. StateFlow is hot: it always holds a current value, emits updates to every collector, and new collectors get the latest value immediately. I use StateFlow to expose UI state from a ViewModel, because the screen should always see the current state, including after rotation. For one-off streams such as reading a file or a database query, a cold Flow fits better.
17.What are data classes, and what do they generate for you?
What they're really asking: Basic language knowledge used everywhere in Kotlin code.
Answer outline
- A data class generates equals, hashCode, toString, copy and component functions from its primary constructor properties.
- They suit models and state objects, and copy makes immutable updates easy.
18.What are extension functions, and what are their limits?
What they're really asking: Do you use extension functions wisely?
Answer outline
- Extension functions add methods to existing types without inheritance, resolved statically at compile time.
- They cannot access private members, and overusing them can scatter logic in confusing places.
19.How do you handle exceptions in coroutines?
What they're really asking: Can you keep failures from crashing or leaking silently?
Answer outline
- Exceptions in launch propagate to the parent scope; in async they surface when you call await.
- Use try-catch around suspending calls, a CoroutineExceptionHandler for top-level logging, and supervisorScope when children should fail independently.
20.How does recomposition work in Jetpack Compose?
What they're really asking: Do you understand how Compose updates the screen?
Answer outline
- When state read by a composable changes, Compose re-runs that composable and skips ones whose inputs are unchanged.
- Stable types, remember and keys help Compose skip work and avoid unnecessary recomposition.
21.What are scope functions such as let, apply and also used for?
What they're really asking: Do you write idiomatic, readable Kotlin?
Answer outline
- They run a block on an object, differing in whether the object is it or this and what the block returns.
- Use them where they make code clearer, such as apply for configuring objects, and avoid long nested chains.
22.How does Kotlin interoperate with Java?
What they're really asking: Can you work in mixed codebases?
Answer outline
- Kotlin calls Java directly, and Java can call Kotlin, with annotations like JvmStatic and JvmOverloads smoothing the edges.
- Java types arrive as platform types with unknown nullability, so add checks or annotations at the boundary.
Take-home or live exercise: tips
Kotlin interviews often include live coding in an IDE or shared editor, such as fetching and displaying data with coroutines, or a take-home Android app or small service with tests.
- Use idiomatic Kotlin, such as data classes, sealed results and safe calls, rather than Java habits.
- Explain which scope each coroutine runs in and what happens when it is cancelled.
- In a take-home, include tests, a clear README and a note on what you would add with more time.
Situational questions (23–30)
Scenarios that test judgement: say what you'd do first, and why.
23.A screen keeps loading data again after every rotation. How do you fix it?
What they're really asking: Do you understand Android configuration changes?
Answer outline
- Move the loading into a ViewModel so it survives configuration changes, and expose results as StateFlow.
- Collect the flow in a lifecycle-aware way so the screen simply reads the existing state after rotation.
Full sample answer (fictional example)
That usually means the loading is triggered from the activity or composable itself, so it runs again when the configuration changes. I would move the load into a ViewModel, which survives rotation, start it once in its init block or on first request, and expose the result as a StateFlow. The screen then collects that state with a lifecycle-aware collector. After rotation, it simply reads the existing value instead of fetching again. I would also check whether a saved state handle is needed for anything that should survive process death.
24.A coroutine you started keeps running after the user leaves the screen. What do you do?
What they're really asking: Can you stop background work when it is no longer needed?
Answer outline
- Launch it in a scope tied to the screen or ViewModel, such as viewModelScope, rather than GlobalScope.
- Make sure long loops check for cancellation and that blocking calls run in cancellable code.
25.A teammate wants to use the double-bang operator to silence compiler errors. How do you respond?
What they're really asking: Do you protect the benefits of null safety?
Answer outline
- Explain that it turns a compile-time check back into a runtime crash.
- Suggest handling the null case explicitly, or fixing the type so the value cannot be null in the first place.
Full sample answer (fictional example)
I would explain that the double-bang operator throws away the very protection that makes Kotlin safer, turning a compiler warning into a possible crash for users. Then I would look at the specific cases with them. Often the value can never be null in practice, and the real fix is to change the type or initialize it properly. Where null is possible, a safe call or a sensible default handles it. I would suggest a lint rule that flags new uses, so the conversation happens in review rather than in a crash report.
26.A Spring Boot service written in Kotlin slows down under load. How do you investigate?
What they're really asking: Can you diagnose backend performance in Kotlin?
Answer outline
- Check metrics for thread pool saturation, slow database queries and garbage collection pauses.
- Profile a hot path, and look for blocking calls made inside coroutines or on request threads.
27.Your Compose screen stutters when scrolling a long list. How do you investigate?
What they're really asking: Can you fix rendering performance in Compose?
Answer outline
- Use the layout inspector and recomposition counts to find items that recompose too often.
- Add stable keys, hoist expensive work out of composables and check that list item types are stable.
28.You need to call three independent APIs and combine the results. How do you write it?
What they're really asking: Can you run parallel work with coroutines safely?
Answer outline
- Use coroutineScope with three async calls and await them together, so a failure cancels the others.
- Add timeouts and decide whether a partial result is acceptable if one call fails.
29.The team debates moving from Dagger to Hilt or Koin. How do you help decide?
What they're really asking: Do you weigh tooling changes carefully?
Answer outline
- List the current pain points, such as build time or boilerplate, and check what each option fixes.
- Try the leading option on one module and compare build time, test setup and learning cost.
30.A crash appears only on one Android version in production. What do you do?
What they're really asking: Can you handle device-specific failures methodically?
Answer outline
- Group the crash reports by device and version, then reproduce on an emulator or real device with that version.
- Check for API differences or behavior changes in that release, guard the code path and add a test device to CI.
Red flags to avoid in your answers
Each one is quick to fix before the day.
Using GlobalScope or ignoring cancellation.
Show how you tie coroutines to a lifecycle and stop work that is no longer needed.
Writing Java in Kotlin syntax.
Practice idiomatic patterns such as data classes, sealed classes and expression-style code.
Scattering the double-bang operator to quiet the compiler.
Explain how you handle nullable values properly at the source.
Talking about features without any quality numbers.
Bring crash-free rate, startup time or latency figures from your own work.
How to prepare for a kotlin developer interview in 7 days
An hour or two a day is enough; the order matters more than the length.
Day 1: Kotlin language refresh
Review null safety, data and sealed classes, extension and scope functions with short examples.
Day 2: Coroutines deep dive
Practice launch, async, scopes, dispatchers, cancellation and exception handling in small programs.
Day 3: Flow and state
Build a ViewModel or service that exposes StateFlow and combines two flows with operators.
Day 4: Platform session
Build a small Compose screen or Ktor endpoint with loading, error and success states.
Day 5: Testing practice
Write tests with runTest, MockK and Turbine or Kotest for your platform session code.
Day 6: Architecture rehearsal
Sketch the structure of a feature or service, covering layers, data flow and error handling.
Day 7: Kotlin mock and recharge
Do a timed mock with one coding task and two behavioral stories, then spend the rest of the day offline.
Questions to ask the interviewer
Pick two or three; the answers tell you whether you want the job.
- How much of the codebase is still Java, and is there a plan for the rest?
- How far along is the move to Jetpack Compose or coroutines?
- How do releases work, and do you use staged rollouts?
- Does the team share any code across platforms with Kotlin Multiplatform?
- Which quality metrics, such as crash-free rate or latency, does the team watch most closely?
Preparation tips
- Review null safety, data and sealed classes, scope functions, coroutines, dispatchers and Flow until you can explain each simply.
- Practice a small Kotlin task, such as fetching and caching data with coroutines, without an IDE's help.
- Prepare one story with a measured result, such as a crash rate or latency improvement.
Prepare the general questions too: tell me about yourself, why do you want to work here? and why are you leaving? Afterwards, send a thank-you email; when the offer comes, negotiate the salary.
How we wrote this page
The FindAJobAI team wrote the questions, outlines and sample answers for kotlin developer interviews. The people, employers and numbers in the samples are invented: copy the structure, and use details from your own work.
Once we track enough live kotlin developer job ads, this page also shows the skills they ask for most, counted the same way as our in-demand skills report.
Last reviewed on November 1, 2026.