日期:2014-05-19  浏览次数:20804 次

能不能在内部类中创建外部类的对象?
怎样才能在内部类中创建外部类的对象?

------解决方案--------------------
不能吗?
------解决方案--------------------
直接引用new就行啦?有问题么?
------解决方案--------------------
public class test1 {

class t{
test1 t = new test1();
}
}
这样不可以吗?

------解决方案--------------------
当然可以了。。。一样的new
------解决方案--------------------
1
tx
2
public class bao {
tx sc = new tx();
sc.~~~~~~~~~~~
}