Topic: 怎样访问一个内部类的对象 |
Print this page |
1.怎样访问一个内部类的对象 | Copy to clipboard |
Posted by: hulizhong Posted on: 2005-04-19 18:22 public class A{ ....................... class B{ .......... B b=new B(); ........... }//end class B ...................... A(){ } } 怎么在类B的外部,在类A的内部访问对象b? 谢谢解答 |
2.Re:怎样访问一个内部类的对象 [Re: hulizhong] | Copy to clipboard |
Posted by: kaiserlew Posted on: 2005-04-20 11:44 A.B ab=new A().new B(); 或者 A a = new A(); A.B ab = a.new B(); |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |