| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 633 人关注过本帖
标题:外部类调用super()的含义
只看楼主 加入收藏
hellobccn
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-10-11
收藏
 问题点数:0 回复次数:0 
外部类调用super()的含义
class Vehicle
{
class Wheel
{
}
}
class PlaneWheel extends Vehicle.Wheel
{
PlaneWheel(Vehicle ve)
{
ve.super();
}
public static void main(String[] args)
{
Vehicle vehicle=new Vehicle();
PlaneWheel pw=new PlaneWheel(vehicle);
}
}
上面程序里为什么PlaneWheel构造器要用ve.super();使用外部类对象调用super()构造器到底是调用什么?
搜索更多相关主题的帖子: 部类 super 含义 
2007-10-11 20:09
快速回复:外部类调用super()的含义
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017813 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved