看程序,写结果
来源:互联网 发布:软件png图标 编辑:程序博客网 时间:2024/04/27 12:45
class A {
public void show() {
show2();
}
public void show2() {
System.out.println("我");
}
}
class B extends A {
public void show2() {
System.out.println("爱");
}
}
class C extends B {
public void show() {
super.show();
}
public void show2() {
System.out.println("你");
}
}
public class DuoTaiTest4 {
public static void main(String[] args) {
A a = new B();
a.show();
B b = new C();
b.show();
}
}
//运行结果:爱你
0 0
- 看程序写结果
- 看程序写结果
- 看程序,写结果
- 看程序写结果
- java(看程序写结果)
- 看程序写结果(program)
- String 看程序写结果
- 面试题10:看程序写结果(继承)
- java面试题1--继承--看程序写结果
- 面向对象_代码块看程序写结果
- 常见对象_String面试题看程序写结果
- 面向对象-代码块看程序写结果
- 读程序写结果:
- 写程序结果
- 看奥运,写程序
- 面向对象_多态的练习题看程序写结果
- java_se_recall 看程序写结果测试题 (包含继承 重写 多态知识)
- 阅读程序,写结果1
- 多态继承中的内存图解
- 第2章 Spring常用配置
- java异常:ClassCastException
- python+selenium定位web元素篇
- vs2013 error MSB6003: The specified task executable "cmd.exe" could not be run
- 看程序,写结果
- 顶级免费空间hostinger搭建个人网…
- Http之referer
- Android6.0 申请权限比较优雅的处理方法
- 系统蓝屏x00000024错误代码
- 《将博客搬至CSDN》
- php中include,require的文件包含问题,以及$_SERVER['PHP_SELF']和__FILE__的区别
- Linux配置Eclipse
- Python出现ValueError: need more than 1 value to unpack 的原因