Skip to content
tezvyn:

Android & Kotlin

Jetpack Compose, Android Studio, Kotlin, Material You

111 bites

Test yourself: Top 30 intermediate Android & Kotlin interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Intermediate interview questions in Android & Kotlin

What is an extension function? Write a hasWhitespace extension for String.
intermediate2 min read

What is an extension function? Write a hasWhitespace extension for String.

Explain receiverType.functionName adds behavior without inheritance; write hasWhitespace with any { it.isWhitespace() }.

What is a Kotlin extension function? Write one for String.
intermediate2 min read

What is a Kotlin extension function? Write one for String.

Tests your grasp of adding functionality to existing classes without inheritance. A great answer defines it as syntactic sugar over static methods, explains its use for third-party code, then implements the requested String.hasWhitespace function.

What is a Kotlin extension function? Write one for String.
intermediate2 min read

What is a Kotlin extension function? Write one for String.

Tests adding functionality to classes without inheritance. Define extension functions as static utilities, explain their use case (e.g., third-party libs), then write hasWhitespace using an idiomatic method like any. A red flag is manually looping.

What are the primary advantages of using a data class?
intermediate2 min read

What are the primary advantages of using a data class?

Tests Kotlin boilerplate reduction and value semantics. Name three generated functions like equals, hashCode, and copy; explain structural equality; and show copy updating immutable UI state.

What are the advantages of a Kotlin data class?
intermediate2 min read

What are the advantages of a Kotlin data class?

Tests knowledge of Kotlin's boilerplate reduction for data holders. A good answer defines the advantage (conciseness), names generated functions like equals, hashCode, and copy, and explains copy for immutable state updates.

What are the advantages of a Kotlin data class and its functions?
intermediate2 min read

What are the advantages of a Kotlin data class and its functions?

Tests knowledge of Kotlin's idiomatic features. A good answer explains the main advantage (boilerplate reduction), lists generated functions like toString() and equals(), and describes copy() for immutable state updates.

Explain lateinit var versus val by lazy in Android
intermediate2 min read

Explain lateinit var versus val by lazy in Android

Tests deferred initialization and lifecycle coupling. Great answers contrast lateinit var's imperative assignment with lazy's first-access delegation, mapping lateinit to injected Activity fields and lazy to expensive computed objects.

lateinit var vs. val by lazy in Android
intermediate2 min read

lateinit var vs. val by lazy in Android

Tests your grasp of Kotlin's non-nullable property initialization. Define lateinit (mutable, framework-init) vs. lazy (immutable, deferred-init). Use lateinit for Views in onCreate and lazy for expensive objects. Red flag: confusing their mutability.

lateinit var vs. val by lazy in Android
intermediate2 min read

lateinit var vs. val by lazy in Android

Tests your grasp of Kotlin property initialization and its lifecycle implications. A good answer contrasts mutability (var/val), initialization timing, and thread safety.

Explain higher-order functions and implement filterAndTransform
intermediate2 min read

Explain higher-order functions and implement filterAndTransform

Tests whether you can define higher-order functions and use lambdas idiomatically in Kotlin. A strong answer defines HOFs as functions that take or return functions, then implements filterAndTransform with filter and map.

Explain and implement a higher-order function in Kotlin
intermediate2 min read

Explain and implement a higher-order function in Kotlin

Tests your grasp of functions as first-class citizens. Define a higher-order function, explain it takes/returns functions, then implement filterAndTransform using the specified lambdas.

Explain and implement a Kotlin higher-order function
intermediate2 min read

Explain and implement a Kotlin higher-order function

Tests understanding of first-class functions and lambda usage. First, define a higher-order function (HOF) as one that takes/returns functions. Then, implement the requested function, iterating to apply the predicate and transform.

How does Structured Concurrency handle cancellations and exceptions?
intermediate2 min read

How does Structured Concurrency handle cancellations and exceptions?

This tests scope-bound lifecycle management preventing leaks. Cover scope cancellation cascading to children, exceptions propagating up to cancel siblings, and launch or async requiring a scope. A red flag is treating coroutines as fire-and-forget threads.

Structured Concurrency in Kotlin Coroutines
intermediate2 min read

Structured Concurrency in Kotlin Coroutines

Tests your understanding of coroutine lifecycles and error handling. A good answer defines the parent-child relationship, then explains how cancellation and exceptions propagate through the scope. A red flag is simply calling it a way to 'group' coroutines.

Explain Structured Concurrency in Kotlin Coroutines
intermediate2 min read

Explain Structured Concurrency in Kotlin Coroutines

Tests your grasp of coroutine lifecycle management. A great answer defines the parent-child relationship within a CoroutineScope, explains cancellation propagation, and details how exceptions cancel the entire hierarchy.

Hot vs cold Kotlin Flows and StateFlow use case
intermediate2 min read

Hot vs cold Kotlin Flows and StateFlow use case

Tests grasp of flow lifecycle and collector behavior. A strong answer contrasts cold Flows, which restart per collector, with hot StateFlows broadcasting to all observers. Red flag: using Flow for UI state without citing config changes or initial value.

Hot vs. Cold Streams: `StateFlow` vs. `Flow`
intermediate2 min read

Hot vs. Cold Streams: `StateFlow` vs. `Flow`

Tests your grasp of stream lifecycles. A great answer defines cold Flow (lazy, per-collector) vs. hot StateFlow (shared, active), then uses a ViewModel UI state scenario to show why StateFlow is correct for surviving configuration changes.

Hot vs. Cold Streams: StateFlow vs. Flow in Android
intermediate2 min read

Hot vs. Cold Streams: StateFlow vs. Flow in Android

This tests your grasp of stream lifecycles. A great answer defines cold Flow (lazy, per-collector) vs. hot StateFlow (active, shared state) and uses a ViewModel UI state scenario. A red flag is mischaracterizing a Flow as a one-time operation.

What is a CoroutineDispatcher and when to use Default versus IO?
intermediate2 min read

What is a CoroutineDispatcher and when to use Default versus IO?

This tests thread pool selection and the CPU versus IO distinction. A strong answer maps CoroutineDispatcher to the thread pool, Default to CPU work, IO to blocking IO, and Main to the UI thread.

What is a CoroutineDispatcher and when do you use each type?
intermediate2 min read

What is a CoroutineDispatcher and when do you use each type?

Tests your grasp of coroutine threading. A dispatcher manages which threads a coroutine runs on. Explain Main for UI, Default for CPU-intensive work, and IO for blocking operations. A red flag is mixing up IO and Default or using Unconfined.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles