What does this print?
fun main() {
val x: Any = 42
val n = x as Int
println(n * 2)
}
Try it in the online Kotlin Playground →
[spoiler title="Solution"]
Answer:
84
Explanation:
as explicitly casts a value to the specified type.
[/spoiler]