标签:
class Do1 { public static void main(String[] args) { AA a=new CC(); if(a instanceof CC) { CC b=(CC)a; b.run(); } } } class AA { int y=3; void brun() { System.out.println(y); } } class CC extends AA { int x=1; void run() { System.out.println(x); } } class BB extends AA { int x=2; void run() { System.out.println(x); } }
标签:
原文地址:http://www.cnblogs.com/zywf/p/4705798.html