标题:[求助]this关键字问题
取消只看楼主
xbw0114
Rank: 1
等 级:新手上路
帖 子:141
专家分:0
注 册:2007-8-8
 问题点数:0 回复次数:0 
[求助]this关键字问题
this1:

class Container
{
Component comp;
public void addComponent()
{
comp = new Component(this);
}
}
class Component
{
Container myContainer;
public Component(Container c)
{
myContainer = c;
}
}
this2:
public class Person
{
String name;
int age;
public Person(String name)
{
this.name = name;
}
public Person(String name,int age)
{
this(name);
this.age = age;
}
}
问下这两个方法里的this用法各是什么呀
搜索更多相关主题的帖子: public 关键字 
2007-08-27 16:51



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-165773-1-1.html




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

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