我的JAVA
http://www.diybl.com/ 2008-3-16 网络 点击:
[ 评论 ]
文章搜索:
【点击打包该文章】
class Mammal {
Mammal () {
System.out.println (“Mamml”);
}
}
class Dog extends Mammal {
Dog () {
System.out.println (“Dog”);
}
}
public class Collie extends Dog {
public static void main (String argv []) {
Collie c = new Collie ();
}
Collie () {
this (“Good Dog”);
System.out.println (“Collie”);
}
Collie (String s) {
System.out.println (s);
}
}
将会输出什么?
1) Compile time error
2) Mammal, Dog, Good Dog, Collie
3) Good Dog, Collie, Dog, Mammal
4) Good Dog, Collie
如果图片或页面不能正常显示请点击这里 站内搜索:
推荐文章 |
