FullStackFSCCafé
 
 
Sign in with GoogleSign in with Google. Opens in new tab
Kill Your Tech Interview
3877 Full-Stack, Algorithms & System Design Interview Questions
Answered To Get Your Next Six-Figure Job Offer
      
🤖 Having Machine Learning & DS Interview? Check  MLStack.Cafe - 1704 Data Science & ML Interview Questions & Answers!Having ML & DS Interview? Check 🤖 MLStack.Cafe - 1704 ML & DS Interview Questions and Answers

Top 68 Kotlin Interview Questions

Entry Junior Mid Senior Expert
Sign in with GoogleSign in with Google. Opens in new tab
Topic Progress:

Theoretical Questions

Q1:   

How to correctly concatenate a String in Kotlin?

  
Add to PDF   Junior 
Q2:   

What is a data class in Kotlin?

  
Add to PDF   Junior 
Q3:   

How to initialize an array in Kotlin with values?

  
Add to PDF   Junior 
Q4:   

What is the idiomatic way to remove duplicate strings from array?

  
Add to PDF   Junior 
Q5:   

Where should I use var and where val?

  
Add to PDF   Junior 
Q6:   

What is the difference between var and val in Kotlin?

  
Add to PDF   Junior 
Q7:   

What is basic difference between fold and reduce in Kotlin? When to use which?

  
Add to PDF   Junior 
Q8:   

What is a primary constructor in Kotlin?

  
Add to PDF   Junior 
Q9:   

May you use IntArray and an Array<Int> is in Kotlin interchangeably?

  
 Add to PDF   Mid 
Q10:   

What are the advantages of Kotlin over Java?

  
 Add to PDF   Mid 
Q11:   

Explain advantages of when vs switch in Kotlin

  
 Add to PDF   Mid 
Q12:   

What is the difference between List and Array types?

  
 Add to PDF   Mid 
Q13:   

Explain lazy initialization in Kotlin

  
 Add to PDF   Mid 
Q14:   

What are coroutines in Kotlin?

  
 Add to PDF   Mid 
Q15:   

When to use lateinit over lazy initialization in Kotlin?

  
 Add to PDF   Mid 
Q16:   

What is the purpose of Unit-returning in functions? Why is VALUE there? What is this VALUE?

  
 Add to PDF   Mid 
Q17:   

When would you use Elvis operator in Kotlin?

  
 Add to PDF   Mid 
Q18:   

What is suspending function in Kotlin?

  
 Add to PDF   Mid 
Q19:   

What is a difference between a class and object in Kotlin?

  
 Add to PDF   Mid 
Q20:   

What is the equivalent of Java static methods in Kotlin?

  
 Add to PDF   Mid 
Q21:   

What are scope functions in Kotlin?

  
 Add to PDF   Mid 
Q22:   

How would you create a singleton with parameter in Kotlin?

  
 Add to PDF   Mid 
Q23:   

What is the Kotlin double-bang !! operator?

  
 Add to PDF   Mid 
Q24:   

What is a purpose of Companion Objects in Kotlin?

  
 Add to PDF   Mid 
Q25:   

What is the difference between suspending vs. blocking?

  
 Add to PDF   Mid 
Q26:   

val mutableList vs var immutableList. When to use which in Kotlin?

  
 Add to PDF   Mid 
Q27:   

What is lateinit in Kotlin and when would you use it?

  
 Add to PDF   Mid 
Q28:   

How are extensions resolved in Kotlin and what doest it mean?

  
 Add to PDF   Mid 
Q29:   

What is the difference between open and public in Kotlin?

  
 Add to PDF   Mid 
Q30:   

May you briefly compare Kotlin vs Java?

  
 Add to PDF   Mid 
Q31:   

What is the difference between const and val?

  
 Add to PDF   Mid 
Q32:   

What are some disadvantages of Kotlin?

  
 Add to PDF   Mid 
Q33:   

Why would you use apply in Kotlin?

  
 Add to PDF   Mid 
Q34:   

Explain the null safety in Kotlin

  
 Add to PDF   Mid 
Q35:   

How is it recommended to create constants in Kotlin?

  
 Add to PDF   Mid 
Q36:   

What is the idiomatic way to deal with nullable values, referencing or converting them?

  
 Add to PDF   Mid 
Q37:   

Provide a real use case when inline classes may be useful

  
 Add to PDF   Senior 
Q38:   

What is Kotlin backing field is used for?

  
 Add to PDF   Senior 
Q39:   

How can I create static method for enum in Kotiln?

  
 Add to PDF   Senior 
Q40:   

Explain the difference between Inline classes vs type aliases

  
 Add to PDF   Senior 
Q41:   

Why is there no static keyword in Kotlin?

  
 Add to PDF   Senior 
Q42:   

What are Object expressions in Kotlin and when to use them?

  
 Add to PDF   Senior 
Q43:   

What is Coroutine Scope and how is that different from Coroutine Context?

  
 Add to PDF   Senior 
Q44:   

How does the reified keyword in Kotlin work?

  
 Add to PDF   Expert 
Q45:   

What is the difference between Java field and Kotlin property?

  
 Add to PDF   Expert 
Q46:   

When to use and do not use an inline function in Kotlin?

  
 Add to PDF   Expert 
Q47:   

What is The Billion Dollar Mistake?

  
 Add to PDF   Expert 
Q48:   

What is the difference between launch/join and async/await in Kotlin coroutines?

  
 Add to PDF   Expert 
Q49:   

What is a motivation to make classes final by default in Kotlin? Do you agree with that decision?

  
 Add to PDF   Expert 
Q50:   

Why do we use companion object as a kind of replacement for Java static fields in Kotlin?

  
 Add to PDF   Expert 
Q51:   

How Kotlin coroutines are better than RxKotlin/RxJava?

  
 Add to PDF   Expert 
Q52:   

What is SAM Conversion in Kotlin?

  
 Add to PDF   Expert 
Q53:   

What is the difference between * and Any in Kotlin generics?

  
 Add to PDF   Expert 
Q54:   

Explain the difference between lateinit and lazy in details

  
 Add to PDF   Expert 

Code Challenges

Q1:   

How to create singleton in Kotlin?

  
 Add to PDF   Junior 
Q2:   

Rewrite this code in Kotlin

  
  Add to PDF   Mid 
Q3:   

Explain what is wrong with that code?

  
  Add to PDF   Mid 
Q4:   

How would you refactor this code using apply?

  
  Add to PDF   Mid 
Q5:   

How to convert List to Map in Kotlin?

  
  Add to PDF   Mid 
Q6:   

What will be result of the following code execution?

  
  Add to PDF   Mid 
Q7:   

How to create empty constructor for data class in Kotlin?

  
  Add to PDF   Senior 
Q8:   

Rewrite this code using run extension function

  
  Add to PDF   Senior 
Q9:   

How would you override default getter for Kotlin data class?

  
  Add to PDF   Senior 
Q10:   

What is inline class in Kotlin and when do we need one? Provide an example.

  
  Add to PDF   Senior 
Q11:   

How to create an instance of anonymous class of abstract class in Kotlin?

  
  Add to PDF   Senior 
Q12:   

Imagine you moving your code from Java to Kotlin. How would you rewrite this code in Kotlin?

  
  Add to PDF   Expert 
Q13:   

How to implement Builder pattern in Kotlin?

  
  Add to PDF   Expert 
Q14:   

What's wrong with that code?

  
  Add to PDF   Expert 
 

Rust has been Stack Overflow’s most loved language for four years in a row and emerged as a compelling language choice for both backend and system developers, offering a unique combination of memory safety, performance, concurrency without Data races...

Clean Architecture provides a clear and modular structure for building software systems, separating business rules from implementation details. It promotes maintainability by allowing for easier updates and changes to specific components without affe...

Azure Service Bus is a crucial component for Azure cloud developers as it provides reliable and scalable messaging capabilities. It enables decoupled communication between different components of a distributed system, promoting flexibility and resili...

Cosmos DB has gained popularity among developers and organizations across various industries, including finance, e-commerce, gaming, IoT, and more. Follow along and learn the 24 most common and advanced Azure Cosmos DB interview questions and answers...
More than any other NoSQL database, and dramatically more than any relational database, MongoDB's document-oriented data model makes it exceptionally easy to add or change fields, among other things. It unlocks Iteration on the project. Iteration f...
Unit Tests and Test Driven Development (TDD) help you really understand the design of the code you are working on. Instead of writing code to do something, you are starting by outlining all the conditions you are subjecting the code to and what outpu...
Domain-Driven Design is nothing magical but it is crucial to understand the importance of Ubiquitous Language, Domain Modeling, Context Mapping, extracting the Bounded Contexts correctly, designing efficient Aggregates and etc. before your next DDD p...
At its core, Microsoft Azure is a public cloud computing platform - with solutions including Infrastructure as a Service (IaaS), Platform as a Service (PaaS), and Software as a Service (SaaS) that can be used for services such as analytics, virtual c...
As an asynchronous event-driven JavaScript runtime, Node.js is designed to build scalable network applications. Follow along to refresh your knowledge and explore the 52 most frequently asked and advanced Node JS Interview Questions and Answers every...
Dependency Injection is most useful when you're aiming for code reuse, versatility and robustness to changes in your problem domain. DI is also useful for decoupling your system. DI also allows easier unit testing without having to hit a database and...