【发布时间】:2017-11-18 18:27:09
【问题描述】:
我写了下面的程序,但我无法理解输出。
public class Test {
public static void main(String[] args) {
int[] a = new int[5];
System.out.println(a instanceof Object);
}
}
【问题讨论】:
-
嗯,数组是 Java 中的对象。所以它输出真。
-
感谢您的澄清。现在,我了解了 instanceof 运算符的概念。
标签: java instanceof