Cracking the Kotlin Interview
Published in
3 min readJul 11, 2023
Are you preparing for an Android interview but don’t know where to start because there is just so much to cover? Or have you been preparing since long but need a last minute self-test check-list ? Well, you just landed at the right place! I created this comprehensive list of Kotlin questions ranging from the very basic to advanced topics that covers quite a bit of what’s usually asked in Kotlin interviews! I have also added solution links to point you in the direction of the answer.
Kotlin interview questions
Keywords and Fundamentals
- What is the difference between val and var?
- What is the difference between const and val?
- What is the difference between lateinit and lazy?
- Can I extend classes by default in Kotlin? If not, why? And how do I make it possible? (Open keyword)
- What are the different visibility modifiers in Kotlin? What is the default visibility modifier?
- What are sealed classes in Kotlin? How are they different from enums? Explain a real-world use case for sealed classes.
- What are Data Classes in Kotlin and how are they different from regular classes?
- What are scoped functions and when to use which?