写程序结果
来源:互联网 发布:阿里云系统升级 编辑:程序博客网 时间:2024/04/27 20:58
class Parent {int i=6;int j;Parent(){System.out.println("i="+i+",j="+j);}static {System.out.println("Parent static block.");}}class Child extends Parent {int k=3;Child() {System.out.println("k="+k+",j="+j);}static {System.out.println("Child static block.");}}class test{public static void main(String args[]) {Child c = new Child();}}结果:
Parent static block.
Child static block.
i=6,j=0;
k=3,j=0;
- 读程序写结果:
- 写程序结果
- 看程序写结果
- 看程序写结果
- 看程序,写结果
- 看程序写结果
- java(看程序写结果)
- 阅读程序,写结果1
- 阅读程序,写结果2
- 阅读程序,写结果3
- 阅读程序,写结果4
- 阅读程序,写结果1
- 阅读程序,写结果2
- 阅读程序,写结果4
- 看程序写结果(program)
- String 看程序写结果
- 初赛阅读程序写结果部分
- 阅读程序,并写结果3
- 设计模式实战应用之二:观察者模式
- 微策略面试题:在旋转后的数组中查找元素(二分查找)
- 简单定时器Demo
- LA 3485Bridge
- 【ActivityGroup】中按键监听失灵!
- 写程序结果
- java swing添加侦听事件的一般方法
- WinCE 5.0 WIFI 无线网卡的配置和建立连接
- NSTimer你真的会用了吗!!!
- 我如何把薪水从 50人民币/天 提升到 100美元/小时的 (1)
- 日志操作利器log4cxx 分享
- 第十五周-(项目二)杨辉三角。
- HDU 4612(缩点+求桥+求树的直径)
- [转载]生产者/消费者模式