摘要: 对象的转型:向上转型:子类--》父类向下转型:父类--》子类例如: Class B extends AA a;B b;向上转型是自动的:b = new B();a = b; 向下转型要强制转换:a = new B();b = (B)a; 正确a = new A();b = (B)a; ... 阅读全文
posted @ 2015-06-02 14:49 x-bing 阅读(380) 评论(0) 推荐(0) 编辑