Sign in to unlock

Get unlimited access to all questions and answers

checked

Get lifetime access

checked

Track progress

checked

Save time

The fastest way to prepare
for a tech interview

Check our curated list of full-stack, data structures & software architecture interview questions and answers for developers

Kotlin interview questions

Kotlin interview questions.

Only challenges
Topic progress: 0%
  • 1.

    What is a data class in Kotlin?

    premium question
    completed

    Answer:

  • 2.

    How to initialize an array in Kotlin with values?

    premium question
    completed

    Answer:

  • 3.

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

    premium question
    completed

    Answer:

  • 4.

    Where should I use var and where val?

    premium question
    completed

    Answer:

  • 5.

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

    premium question
    completed

    Answer:

  • 6.

    What is a primary constructor in Kotlin?

    premium question
    completed

    Answer:

  • 7.

    How to correctly concatenate a String in Kotlin?

    premium question
    completed

    Answer:

  • 8.

    What is the difference between var and val in Kotlin?

    premium question
    completed

    Answer:

  • 9.

    How to create singleton in Kotlin?

    premium question
    completed

    Answer:

  • 10.

    What is the difference between suspending vs. blocking?

    premium question
    completed

    Answer:

  • 11.

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

    premium question
    completed

    Answer:

  • 12.

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

    premium question
    completed

    Answer:

  • 13.

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

    premium question
    completed

    Answer:

  • 14.

    May you briefly compare Kotlin vs Java?

    premium question
    completed

    Answer:

  • 15.

    What is the difference between const and val?

    premium question
    completed

    Answer:

  • 16.

    What are some disadvantages of Kotlin?

    premium question
    completed

    Answer:

  • 17.

    Why would you use apply in Kotlin?

    premium question
    completed

    Answer:

  • 18.

    Explain the Null safety in Kotlin

    premium question
    completed

    Answer:

  • 19.

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

    premium question
    completed

    Answer:

  • 20.

    What is the equivalent of Java static methods in Kotlin?

    premium question
    completed

    Answer:

  • 21.

    Explain advantages of when vs switch in Kotlin

    premium question
    completed

    Answer:

  • 22.

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

    premium question
    completed

    Answer:

  • 23.

    What is suspending function in Kotlin?

    premium question
    completed

    Answer:

  • 24.

    How would you create a singleton with parameter in Kotlin?

    premium question
    completed

    Answer:

  • 25.

    When would you use Elvis operator in Kotlin?

    premium question
    completed

    Answer:

  • 26.

    What is the Kotlin double-bang (!!) operator?

    premium question
    completed

    Answer:

  • 27.

    What are scope functions in Kotlin?

    premium question
    completed

    Answer:

  • 28.

    What are coroutines in Kotlin?

    premium question
    completed

    Answer:

  • 29.

    What are the advantages of Kotlin over Java?

    premium question
    completed

    Answer:

  • 30.

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

    premium question
    completed

    Answer:

  • 31.

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

    premium question
    completed

    Answer:

  • 32.

    When to use lateinit over lazy initialization in Kotlin?

    premium question
    completed

    Answer:

  • 33.

    Explain lazy initialization in Kotlin

    premium question
    completed

    Answer:

  • 34.

    What is the difference between List and Array types?

    premium question
    completed

    Answer:

  • 35.

    What is a purpose of Companion Objects in Kotlin?

    premium question
    completed

    Answer:

  • 36.

    How is it recommended to create constants in Kotlin?

    premium question
    completed

    Answer:

  • 37.

    What is the difference between open and public in Kotlin?

    premium question
    completed

    Answer:

  • 38.

    Explain what is wrong with that code?

    premium question
    completed

    Answer:

  • 39.

    How would you refactor this code using apply?

    premium question
    completed

    Answer:

  • 40.

    How to convert List to Map in Kotlin?

    premium question
    completed

    Answer:

  • 41.

    What will be result of the following code execution?

    premium question
    completed

    Answer:

  • 42.

    Rewrite this code in Kotlin

    premium question
    completed

    Answer:

  • 43.

    How can I create static method for enum in Kotiln?

    premium question
    completed

    Answer:

  • 44.

    What is Kotlin backing field is used for?

    premium question
    completed

    Answer:

  • 45.

    Explain the difference between Inline classes vs type aliases

    premium question
    completed

    Answer:

  • 46.

    Why is there no static keyword in Kotlin?

    premium question
    completed

    Answer:

  • 47.

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

    premium question
    completed

    Answer:

  • 48.

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

    premium question
    completed

    Answer:

  • 49.

    Provide a real use case when inline classes may be useful

    premium question
    completed

    Answer:

  • 50.

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

    premium question
    completed

    Answer:

  • 51.

    What is The Billion Dollar Mistake?

    premium question
    completed

    Answer:

  • 52.

    How does the reified keyword in Kotlin work?

    premium question
    completed

    Answer:

  • 53.

    How Kotlin coroutines are better than RxKotlin/RxJava?

    premium question
    completed

    Answer:

  • 54.

    What is the difference between Java field and Kotlin property?

    premium question
    completed

    Answer:

  • 55.

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

    premium question
    completed

    Answer:

  • 56.

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

    premium question
    completed

    Answer:

  • 57.

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

    premium question
    completed

    Answer:

  • 58.

    What is SAM Conversion in Kotlin?

    premium question
    completed

    Answer:

  • 59.

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

    premium question
    completed

    Answer:

  • 60.

    Explain the difference between lateinit and lazy in details

    premium question
    completed

    Answer:

  • 61.

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

    premium question
    completed

    Answer:

  • 62.

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

    premium question
    completed

    Answer:

  • 63.

    How to create empty constructor for data class in Kotlin?

    premium question
    completed

    Answer:

  • 64.

    Rewrite this code using run extension function

    premium question
    completed

    Answer:

  • 65.

    How would you override default getter for Kotlin data class?

    premium question
    completed

    Answer:

  • 66.

    What's wrong with that code?

    premium question
    completed

    Answer:

  • 67.

    How to implement Builder pattern in Kotlin?

    premium question
    completed

    Answer:

  • 68.

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

    premium question
    completed

    Answer:

One tip that got me hired by Google, Microsoft, and Stripe

I've worked for Microsoft, Google, Stripe, and received offers from many other companies. One thing I learned when I was interviewing myself is that standard interview tips are woefully inadequate.

Reverse Tech Interview: Questions to Stump an Interviewer

Few people want to get into an uncomfortable environment or an unprofitable company with no prospects. If you’re wondering how to get a real feel for a company during an interview, you’re welcome. I’ll give a list of questions that interviewers don’t usually expect...

How to become a programmer, move to the US, and get a dream job

Are you curious about what you need to do to earn more than $15.000 a month, drive a Tesla, live in sunny California, and work at Google, Apple, Facebook, or Amazon?

11 Reactive Systems interview questions and answers for software engineers

Reactive systems are an architectural style that allows multiple individual applications to blend into one unit, reacting to their environment, while staying aware of each other. Here is a list of coding interview questions on Reactive Systems to help you get ready for your next data struc...

. Reactive Systems
34 Microservices interview questions and answers for software engineers

Microservice architecture – a variant of the service-oriented architecture structural style – arranges an application as a collection of loosely coupled services. In a microservices architecture, services are fine-grained and the protocols are lightweight. Here is a list of coding intervie...

. Microservices
7 Layering & Middleware interview questions for developers

Middleware in the context of distributed applications is software that provides services beyond those provided by the operating system to enable the various components of a distributed system to communicate and manage data. Middleware supports and simplifies complex distributed application...

. Layering & Middleware
55 Docker interview questions and answers for software engineers

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers. Here is a list of coding interview questions on Docker to help you get ready for your next data structures interview in 2021.

. Docker
23 Databases interview questions and answers for software engineers

A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques. Here is a list of coding interview questions on Databases to help you g...

. Databases
21 Concurrency interview questions and answers for software engineers

In computer science, concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome. Here is a list of coding interview questions on Concurrency to help you get ready for your n...

. Concurrency
13 CAP Theorem interview questions and answers for software engineers

In theoretical computer science, the CAP theorem, also named Brewer's theorem after computer scientist Eric Brewer, states that it is impossible for a distributed data store to simultaneously provide more than two out of the following three guarantees: Consistency: Every read receives the ...

. CAP Theorem
Load more posts

Features

folder icon

Access all answers

Get the inside track on what to expect in your next tech interview. We offer you a collection of high quality technical interview questions to help you prepare for your next coding interview.

graph icon

Track progress

A smart interface helps you track your progress and focus on the topics you need. You can search through questions or sort them by difficulty or type.

clock icon

Save time

Save tens of hours searching for information on hundreds of low-quality sites designed to drive traffic and make money from advertising.

Land a six-figure job at one of the top companies.

amazon logo facebook logo google logo microsoft logo uber logo
Prepare for a technical interview

Get hired with our
tech interview questions & answers