数组值为任意类型,声明报错: Kotlin: Expecting a '>'
var anyArr1: Array<Any?>= arrayOf("a", "b", "c", true, 34)
原因是:
// var anyArr1: Array<Any?>= arrayOf("a", "b", "c", true, 34) //等号之前无空格,报错
IDEA在这里需要,中间必须手动留一个空格,否则按错
var anyArr: Array<Any?> = arrayOf("a", "b", "c", true, 34)
println(anyArr.contentToString())