Logo

Kotlin Questions Set 1:

Quiz Mode

What is the output of the following Kotlin program?

1
2
3
4

Solution:

Which of the following is a valid variable name?

1
2
3
4

Solution:

Kotlin is a ____________ programming language

1
2
3
4

Solution:

What are the variables whose value cannot be changed called?

1
2
3

Solution:

What will be the output of this block of code?

val best_movie = "Shawshank Redemption"
best_movie = "Dark Knight"

println(best_movie)

1
2
3

Solution:

What will be the output of the following Kotlin code?

fun main(args : Array<String>) {

    var bday = 15/8/1947

    println("${bday + bday}")

}

1
2
3
4

Solution:

How to read a line of input as a string without using the Scanner class from the Java standard library?

1
2
3
4

Solution:

What will be the output of the following Kotlin program?

fun main(args: Array<String>) {
println("Abekus Is the best platform to learn");
}

1
2
3

Solution:

What are sealed classes used for in programming?

1
2
3

Solution: