mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-22 10:34:25 +07:00
28 lines
415 B
Java
28 lines
415 B
Java
class A {
|
|
|
|
}
|
|
|
|
class B extends A {
|
|
|
|
}
|
|
|
|
public class Inst {
|
|
public void x() {
|
|
Object a = new Object();
|
|
|
|
|
|
if (a instanceof B) {
|
|
A aa =(A) a;
|
|
if (a instanceof A) {
|
|
System.out.println("HeHe");
|
|
}
|
|
System.out.println(aa);
|
|
}
|
|
}
|
|
|
|
public void y(Object a) {
|
|
if (a instanceof A) {}
|
|
if (a instanceof B) {}
|
|
}
|
|
}
|