Dedian  
          -- 關(guān)注搜索引擎的開發(fā)
          日歷
          <2006年5月>
          30123456
          78910111213
          14151617181920
          21222324252627
          28293031123
          45678910
          統(tǒng)計(jì)
          • 隨筆 - 82
          • 文章 - 2
          • 評(píng)論 - 228
          • 引用 - 0

          導(dǎo)航

          常用鏈接

          留言簿(8)

          隨筆分類(45)

          隨筆檔案(82)

          文章檔案(2)

          Java Spaces

          搜索

          •  

          積分與排名

          • 積分 - 65579
          • 排名 - 817

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

           
          Definition:

          A class within another class

          Example:

          class EnclosingClass 
          {
          ...
          class ANestedClass
          {
          ...
          }
          }

          Purpose:

          Reflect and enforce the relationship between two classes. (esp. in the scenarios that the nested class makes sense only in the context of its enclosing class or when it relies on the enclosing class for its functionthe nested class makes sense only in the context of its enclosing class or when it relies on the enclosing class for its function)

          Interesting features:

          1. An instance of InnerClass can exist only within an instance of EnclosingClass
          2. InnerClass instance has direct access to the instance variables and methods of its enclosing instance.
          3. two special kinds of inner classes: local classes and anonymous classes

          reference:
          http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html
          posted on 2006-05-16 08:22 Dedian 閱讀(325) 評(píng)論(0)  編輯  收藏 所屬分類: Java Glossary
           
          Copyright © Dedian Powered by: 博客園 模板提供:滬江博客
          主站蜘蛛池模板: 武安市| 朝阳区| 即墨市| 应城市| 承德县| 闽侯县| 井研县| 永登县| 子洲县| 武胜县| 会同县| 太仆寺旗| 浦东新区| 聂拉木县| 安陆市| 阿勒泰市| 深圳市| 孝义市| 雅安市| 宁晋县| 万山特区| 河东区| 广昌县| 墨脱县| 宁德市| 红桥区| 徐汇区| 城口县| 紫阳县| 兰坪| 海原县| 唐海县| 翼城县| 苍南县| 黎川县| 海门市| 德州市| 怀安县| 台湾省| 崇州市| 开封县|