设为首页 加入收藏

TOP

Swing中常用的复杂继承关系测试实例
2014-11-23 17:34:53 】 浏览:403
Tags:Swing 常用 复杂 继承 关系 测试 实例

Swing中常用的复杂继承关系测试实例


1、


package com.szsm.swing.other;


public class ExtendsTest {


public static void main(String[] args) {
new ExtendsTest().new Son();
}

class Son extends Parent
{
// public Son() {
// System.out.println("son");
// }

public void init()
{
System.out.println("son init");
}
}
abstract class Parent
{
public Parent() {
System.out.println("father");
init();
}

public void init()
{
System.out.println("father-init");

}
}
}


2、


father
son init


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Swing中使用Bean Binding实例 下一篇jQuery文档加载完毕的几种写法

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目