class Inter{
int a=10;
}
public class Test extends Inter{
int c=8;
public int getC(){
return c;
}
public static void main(String args[]){
Inter b=new Inter();
b=new Test();
if(b instanceof Test){
System.out.print("ok!");
//System.out.print(c.getC());为什么这句不能实现?
}
if(b instanceof Inter){
System.out.print("super is also ok!");
}
}
}