androidengineers.Book a session
โ† All interview questions
KotlinIntermediate4 min

Difference between Coroutine and Java Thread?

Answer

FeatureJava ThreadKotlin Coroutine
WeightHeavyweight (OS managed)Lightweight (User-space managed)
Memory~1MB stack per thread~KB per coroutine
CreationExpensiveCheap
BlockingBlocks the thread when waitingSuspends (frees thread) when waiting
Context SwitchingOS Kernel switch (expensive)Software switch (fast)
ScalabilityLimited (thousands max)Massive (millions possible)

Key Concept: Coroutines are "computations that can be suspended". They can pause execution without blocking the underlying thread, allowing that thread to do other work.

Mark this when you can explain the answer in your own words.

Share & Help Others

Help fellow developers prepare for interviews

Sharing helps the Android community grow ๐Ÿ’š

Keep practising