计算机与现代化 ›› 2012, Vol. 1 ›› Issue (9): 187-189.doi: 10.3969/j.issn.1006-2475.2012.09.048

• 应用与开发 • 上一篇    下一篇

基于Java的匿名内部类分析与应用

吴红萍   

  1. 西北师范大学数学与信息科学学院,甘肃兰州730070
  • 收稿日期:2012-05-11 修回日期:1900-01-01 出版日期:2012-09-21 发布日期:2012-09-21

Analysis and Application of Anonymous Inner Class Based on Java

WU Hong-ping   

  1. College of Mathematics and Information Science, Northwest Normal University, Lanzhou 730070, China
  • Received:2012-05-11 Revised:1900-01-01 Online:2012-09-21 Published:2012-09-21

摘要: 内部类是Java中的一大特色,通过对Java中匿名内部类的创建机制和使用方法的探讨,分析匿名内部类中成员变量与成员方法的属性与规则,并给出匿名内部类的实际应用示例。

关键词: Java语言, 匿名内部类, 分析与应用

Abstract: Inner class is one of major characteristics of Java, this paper discusses the creation mechanism and method of the anonymous inner class in Java, analyzes the attributes and rules of the anonymous inner class member variables and member methods, gives the actual application example to the anonymous inner class.

Key words: Java language, anonymous inner class, analysis and application