Abhimanyu
Array<Any?>
fun main() { val x: Array<Any?> = arrayOf(listOf(1, 2, 3), listOf('a', 'b', 'c')) val y = x[0] as? List<Int> ?: emptyList() val z = x[1] as? List<Char> ?: emptyList() y.forEach { println(it) } z.forEach { println(it) } }
y
Unchecked cast: Any? to List<Int>
z
Unchecked cast: Any? to List<Char>
A modern programming language that makes developers happier.