如题,搜索了下坛子里内部类的帖子,没看出来在实际使用上内部类一般可用于常用的哪方面,有点郁闷,特请教下?
解决方案 »
- javascript search 问题
- 一个JTable 放在JScrollPane中,如果这个JTable有50行,而JScrollPane中一页只能显示20行,我想让JTable 从第25行开始显示,怎么做?
- 从jdk1.5 退到 jdk1.4 的“(Unsupported major.minor version 49.0)”错误
- int类型的数据在前面加上0x和不加有什么区别吗?
- 一个windowcloing的问题
- 线程控制
- 汉字输出问题,在线等待,问题解决就给分!
- Applet为啥在我的win2000IE5中不能正常下载运行,而我装了jdk1.4才可正常?
- 为什么安装不了BDK1.1?
- 急!急!急!在线等您的回复
- JDBC实现分页
- 如何在jTable一行中填加JButton?
2.In a single outer class you can have several inner classes, each of which implement the same interface or inherit from the same class in a different way. 3.The point of creation of the inner class object is not tied to the creation of the outer class object.
4.There is no potentially confusing “is-a” relationship with the inner class; it’s a separate entity.
也可以定义一个函数对象来开展一个任务,比如java.util.TimerTask经常做一个匿名内部类。
也可以模拟多重继承
可以隐藏实现细节其他还有些,用得少