Question Bank
3705 approved questions from the community
What is the difference between 'launch' and 'async' coroutine builders?
What keyword is used to define a suspending function in Kotlin?
Reified type parameters can only be used with inline functions in Kotlin.
Object declarations in Kotlin are lazily initialized when accessed for the first time.
Suspending functions can only be called from other suspending functions or coroutines.
What is the safe cast operator in Kotlin?
What does the not-null assertion operator '!!' do in Kotlin?
What operator is used for safe calls on nullable objects in Kotlin?
What is a nullable type in Kotlin?
In Kotlin, 'List' and 'MutableList' are the same interface.
The Elvis operator '?:' can be used to provide default values for null expressions.
How do you declare a secondary constructor in Kotlin?
What is the purpose of the 'init' block in Kotlin?
How do you declare a primary constructor in Kotlin?
What is a companion object in Kotlin?
Interfaces in Kotlin can have default method implementations.
By default, all classes in Kotlin are open for inheritance.
A Kotlin class can have multiple init blocks.
Sealed classes in Kotlin can have subclasses defined outside the same file or module.
What is the purpose of sealed classes in Kotlin?