Object a = null;
if (a instanceof Object) {
System.out.println("Yes");
} else {
System.out.println("No");
}
上述代码执行,什么结果?
Yes? No? 异常?
正确答案:No
Object a = null;
if (a instanceof Object) {
System.out.println("Yes");
} else {
System.out.println("No");
}
上述代码执行,什么结果?
Yes? No? 异常?
正确答案:No