摘要:
This small tutorial will show you how to create a ListView, enable fast scrolling, and create a alphabetical section list that displays the letter as ... 阅读全文
摘要:
class Fa{int a;method A(){}method B(){}}class Son extends Fa{int a;method B(){}method C(){}main(){Fa x = new Son();//引用的是Fa的a,实例变量不会出现多态问题,x前面是什么,就从哪里引用。x.a;//引用的是Fa的A(),因为Son中没有该方法。x.A();//引用的是Son的B(),因为Son中将Fa中的覆盖了,这就是所谓的多态。x.B();//出现错误,因为Fa中并没有C()方法,不能通过编译。x.C();}} 阅读全文