摘要: java 继承类 变量、静态变量、构造函数执行顺序Java代码classC{staticintprt(inti){System.out.println(i);returni;}}classA{inta=C.prt(0);staticintb=C.prt(1);A(){System.out.println("constructorofA");}}classBextendsA{intc=C.prt(2);staticintd=C.prt(3);B(){System.out.println("constructorofB");}publicvoidtest() 阅读全文
posted @ 2012-02-08 22:17 人生如若初见 阅读(393) 评论(0) 推荐(0) 编辑