There are 6 built-in types to represent numbers in Kotlin
Which of the following is a valid variable name in Kotlin?
What is the output of this program?
fun main() {
var name: String = "Amar"
name = 007
println(name)
}
Which type of exception does the Elvis operator in Kotlin handle?
Which of the following options is the syntactically correct way to get the length of a string?
What is the output of the following Kotlin program?
fun main(args: Array<String>) {
val number1: Int = 540
val number2: Byte = number1.toByte()
println("$number2")
}
What are Lambda Functions?
What is the output of the following Kotlin program?
fun main(args: Array<String>) {
val coolvariables = { x: Int, z: Int -> x * z }
val ant = coolvariables(18, 19)
println(ant)
}
What is the output of this Kotlin program?
What is the output of the following Kotlin program?
fun main(args: Array<String>) {
val one = "Only "
val three = "the wisest "
val nine = "Survive."
val result = one + three + nine
println(result)
}