Replace is Array<T> with .isArrayOf<T>()
This commit is contained in:
@@ -2,7 +2,7 @@ import java.util.Arrays
|
||||
|
||||
fun box(): String {
|
||||
val array = Arrays.asList(2, 3, 9).toTypedArray()
|
||||
if (array !is Array<Int>) return array.javaClass.toString()
|
||||
if (!array.isArrayOf<Int>()) return array.javaClass.toString()
|
||||
|
||||
val str = Arrays.toString(array)
|
||||
if (str != "[2, 3, 9]") return str
|
||||
|
||||
Reference in New Issue
Block a user