Question Bank

3705 approved questions from the community

What is the difference between 'launch' and 'async' coroutine builders?

MEDIUM
SINGLE CHOICE
35s
Kotlin
by Mohamed

What keyword is used to define a suspending function in Kotlin?

MEDIUM
SINGLE CHOICE
25s
Kotlin
by Mohamed

Reified type parameters can only be used with inline functions in Kotlin.

HARD
TRUE FALSE
30s
Kotlin
by Mohamed

Object declarations in Kotlin are lazily initialized when accessed for the first time.

MEDIUM
TRUE FALSE
25s
Kotlin
by Mohamed

Suspending functions can only be called from other suspending functions or coroutines.

MEDIUM
TRUE FALSE
25s
Kotlin
by Mohamed

What is the safe cast operator in Kotlin?

MEDIUM
SINGLE CHOICE
30s
Kotlin
by Mohamed

What does the not-null assertion operator '!!' do in Kotlin?

MEDIUM
SINGLE CHOICE
30s
Kotlin
by Mohamed

What operator is used for safe calls on nullable objects in Kotlin?

MEDIUM
SINGLE CHOICE
25s
Kotlin
by Mohamed

What is a nullable type in Kotlin?

EASY
SINGLE CHOICE
25s
Kotlin
by Mohamed

In Kotlin, 'List' and 'MutableList' are the same interface.

MEDIUM
TRUE FALSE
25s
Kotlin
by Mohamed

The Elvis operator '?:' can be used to provide default values for null expressions.

EASY
TRUE FALSE
20s
Kotlin
by Mohamed

How do you declare a secondary constructor in Kotlin?

MEDIUM
SINGLE CHOICE
30s
Kotlin
by Mohamed

What is the purpose of the 'init' block in Kotlin?

MEDIUM
SINGLE CHOICE
30s
Kotlin
by Mohamed

How do you declare a primary constructor in Kotlin?

EASY
SINGLE CHOICE
25s
Kotlin
by Mohamed

What is a companion object in Kotlin?

EASY
SINGLE CHOICE
30s
Kotlin
by Mohamed

Interfaces in Kotlin can have default method implementations.

MEDIUM
TRUE FALSE
25s
Kotlin
by Mohamed

By default, all classes in Kotlin are open for inheritance.

EASY
TRUE FALSE
20s
Kotlin
by Mohamed

A Kotlin class can have multiple init blocks.

EASY
TRUE FALSE
20s
Kotlin
by Mohamed

Sealed classes in Kotlin can have subclasses defined outside the same file or module.

MEDIUM
TRUE FALSE
25s
Kotlin
by Mohamed

What is the purpose of sealed classes in Kotlin?

MEDIUM
SINGLE CHOICE
35s
Kotlin
by Mohamed
PreviousPage 130 of 186Next