ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
Java SE Lesson 13

1. ÄÚ²¿ÀࣨInner Class£©     £¬ÄÚ²¿À๲·ÖΪ 4 ÖÖ¡£
2. ¾²Ì¬ÄÚ²¿Àࣨstatic inner class£©       £ºÖ»ÄÜ·ÃÎÊÍⲿÀàµÄ¾²Ì¬³ÉÔ±±äÁ¿Ó뾲̬·½·¨£¬Éú³É
   ¾²Ì¬ÄÚ²¿Àà¶ÔÏóµÄ·½Ê½Îª£º
   OuterClass.InnerClass inner = new OuterClass.InnerClass();
3. ³ÉÔ±ÄÚ²¿Àࣨmember inner class£©         £º¿ÉÒÔ·ÃÎÊÍⲿÀàµÄ¾²Ì¬Óë·Ç¾²Ì¬µÄ·½·¨Óë³ÉÔ±±ä
   Á¿¡£Éú³É³ÉÔ±ÄÚ²¿Àà¶ÔÏóµÄ·½Ê½Îª£º
   OuterClass.InnerClass inner = new OuterClass().new InnerClass();
4. ÈôÏëÔÚ¾Ö²¿ÄÚ²¿ÀàÖзÃÎÊÍⲿÀàµÄ³ÉÔ±±äÁ¿£¬Ó﷨Ϊ£ºOuterClass.this.a;
5. ¾Ö²¿ÄÚ²¿ÀࣨLocal Inner Class£©        £º¶¨ÒåÔÚ·½·¨µ±ÖУ¬Ö»ÄÜ·ÃÎÊ·½·¨ÖÐÉùÃ÷µÄ final ÀàÐÍ
   µÄ±äÁ¿¡£
6. ÄäÃûÄÚ²¿ÀࣨAnonymous Inner Class£©          £ºÄäÃûÄÚ²¿Àà»áÒþʽµØ¼Ì³ÐÒ»¸ö¸¸Àà»òʵÏÖÒ»
   ¸ö½Ó¿Ú¡£
7. ËùνµÝ¹é£¨Recursion£©        £¬¾ÍÊÇ·½·¨µ÷ÓÃ×ÔÉí¡£¶ÔÓڵݹéÀ´Ëµ£¬Ò»¶¨ÓÐÒ»¸ö³ö¿Ú£¬ÈõÝ
   ¹é½áÊø£¬Ö»ÓÐÕâÑù²ÅÄܱ£Ö¤²»³öÏÖËÀÑ­»·¡£
8. ×÷Òµ£º   ¸ø¶¨ÈÎÒâÒ»¸öĿ¼£¬             ÒÔÊ÷Ðη½Ê½Õ¹ÏÖ³ö¸ÃĿ¼ÖеÄËùÓÐ×ÓĿ¼ºÍÎļþ¡£               ÁíÍ⣬
   ÔÚÕ¹ÏÖµÄʱºò½«Ä¿Â¼ÅÅÔÚÉÏÃ棬ÎļþÅÅÔÚÏÂÃ档ÿһ²ãÒª¼ÓÉÏËõ½ø¡£

More Related Content

Viewers also liked (18)

trabalho arq. computadorestrabalho arq. computadores
trabalho arq. computadores
deniscody
?
AccesoriosAccesorios
Accesorios
marialuzgobbi
?
ºÝºÝߣºÝºÝߣ
ºÝºÝߣ
guestf64b9f
?
[ʥ˼԰][Java SE]Clone
[ʥ˼԰][Java SE]Clone[ʥ˼԰][Java SE]Clone
[ʥ˼԰][Java SE]Clone
ArBing Xie
?
Imaginary civilization
Imaginary civilizationImaginary civilization
Imaginary civilization
landonwhite
?
Presentation11th july
Presentation11th julyPresentation11th july
Presentation11th july
viscabarca
?
Az archaikus cig¨¢nyn¨¦p¨¦let a magyar t¨¢rsadalomban
Az archaikus cig¨¢nyn¨¦p¨¦let a magyar t¨¢rsadalombanAz archaikus cig¨¢nyn¨¦p¨¦let a magyar t¨¢rsadalomban
Az archaikus cig¨¢nyn¨¦p¨¦let a magyar t¨¢rsadalomban
rszk_Hungary
?
Photo show
Photo show Photo show
Photo show
RyanHochadel
?
Anna Petrova for TEDxKYIV.pptx
Anna Petrova for TEDxKYIV.pptxAnna Petrova for TEDxKYIV.pptx
Anna Petrova for TEDxKYIV.pptx
Anna
?
Tecnicas de comunicacion virtual (celulas madre metodo de lectura ipler)Tecnicas de comunicacion virtual (celulas madre metodo de lectura ipler)
Tecnicas de comunicacion virtual (celulas madre metodo de lectura ipler)
kaomi9810
?
Mitosis
MitosisMitosis
Mitosis
carissaf
?
Galicia is Different
Galicia is DifferentGalicia is Different
Galicia is Different
B2B3
?
NPPA FOTOGRAFIA IINPPA FOTOGRAFIA II
NPPA FOTOGRAFIA II
guest502e2c2
?
Uh oh no_tinc_por
Uh oh no_tinc_porUh oh no_tinc_por
Uh oh no_tinc_por
Monprojects .
?
[ʥ˼԰][Java SE]Java se lesson 22
[ʥ˼԰][Java SE]Java se lesson 22[ʥ˼԰][Java SE]Java se lesson 22
[ʥ˼԰][Java SE]Java se lesson 22
ArBing Xie
?
Simon BEAUVALLET : Num¨¦riser les archives des MDPH, le point de vue de l¡¯arch...Simon BEAUVALLET : Num¨¦riser les archives des MDPH, le point de vue de l¡¯arch...
Simon BEAUVALLET : Num¨¦riser les archives des MDPH, le point de vue de l¡¯arch...
idealconnaissances
?
Aplic mov ondAplic mov ond
Aplic mov ond
kukulkanjorge
?
229 mex- sierra tarahumara [cr]229 mex- sierra tarahumara [cr]
229 mex- sierra tarahumara [cr]
idejol
?
trabalho arq. computadorestrabalho arq. computadores
trabalho arq. computadores
deniscody
?
AccesoriosAccesorios
Accesorios
marialuzgobbi
?
ºÝºÝߣºÝºÝߣ
ºÝºÝߣ
guestf64b9f
?
[ʥ˼԰][Java SE]Clone
[ʥ˼԰][Java SE]Clone[ʥ˼԰][Java SE]Clone
[ʥ˼԰][Java SE]Clone
ArBing Xie
?
Imaginary civilization
Imaginary civilizationImaginary civilization
Imaginary civilization
landonwhite
?
Presentation11th july
Presentation11th julyPresentation11th july
Presentation11th july
viscabarca
?
Az archaikus cig¨¢nyn¨¦p¨¦let a magyar t¨¢rsadalomban
Az archaikus cig¨¢nyn¨¦p¨¦let a magyar t¨¢rsadalombanAz archaikus cig¨¢nyn¨¦p¨¦let a magyar t¨¢rsadalomban
Az archaikus cig¨¢nyn¨¦p¨¦let a magyar t¨¢rsadalomban
rszk_Hungary
?
Anna Petrova for TEDxKYIV.pptx
Anna Petrova for TEDxKYIV.pptxAnna Petrova for TEDxKYIV.pptx
Anna Petrova for TEDxKYIV.pptx
Anna
?
Tecnicas de comunicacion virtual (celulas madre metodo de lectura ipler)Tecnicas de comunicacion virtual (celulas madre metodo de lectura ipler)
Tecnicas de comunicacion virtual (celulas madre metodo de lectura ipler)
kaomi9810
?
Galicia is Different
Galicia is DifferentGalicia is Different
Galicia is Different
B2B3
?
NPPA FOTOGRAFIA IINPPA FOTOGRAFIA II
NPPA FOTOGRAFIA II
guest502e2c2
?
[ʥ˼԰][Java SE]Java se lesson 22
[ʥ˼԰][Java SE]Java se lesson 22[ʥ˼԰][Java SE]Java se lesson 22
[ʥ˼԰][Java SE]Java se lesson 22
ArBing Xie
?
Simon BEAUVALLET : Num¨¦riser les archives des MDPH, le point de vue de l¡¯arch...Simon BEAUVALLET : Num¨¦riser les archives des MDPH, le point de vue de l¡¯arch...
Simon BEAUVALLET : Num¨¦riser les archives des MDPH, le point de vue de l¡¯arch...
idealconnaissances
?
Aplic mov ondAplic mov ond
Aplic mov ond
kukulkanjorge
?
229 mex- sierra tarahumara [cr]229 mex- sierra tarahumara [cr]
229 mex- sierra tarahumara [cr]
idejol
?

More from ArBing Xie (20)

[ʥ˼԰][Java SE]Java se lesson 3
[ʥ˼԰][Java SE]Java se lesson 3[ʥ˼԰][Java SE]Java se lesson 3
[ʥ˼԰][Java SE]Java se lesson 3
ArBing Xie
?
[ʥ˼԰][Java SE]Swing
[ʥ˼԰][Java SE]Swing[ʥ˼԰][Java SE]Swing
[ʥ˼԰][Java SE]Swing
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 15
[ʥ˼԰][Java SE]Java se lesson 15[ʥ˼԰][Java SE]Java se lesson 15
[ʥ˼԰][Java SE]Java se lesson 15
ArBing Xie
?
[ʥ˼԰][Java SE]Websphere.application.developer(wsad)ʹÓÃÍâÖÃwin cvs½â¾ö·½°¸
[ʥ˼԰][Java SE]Websphere.application.developer(wsad)ʹÓÃÍâÖÃwin cvs½â¾ö·½°¸[ʥ˼԰][Java SE]Websphere.application.developer(wsad)ʹÓÃÍâÖÃwin cvs½â¾ö·½°¸
[ʥ˼԰][Java SE]Websphere.application.developer(wsad)ʹÓÃÍâÖÃwin cvs½â¾ö·½°¸
ArBing Xie
?
[ʥ˼԰][Java SE]Strategy
[ʥ˼԰][Java SE]Strategy[ʥ˼԰][Java SE]Strategy
[ʥ˼԰][Java SE]Strategy
ArBing Xie
?
[ʥ˼԰][Java SE]Reflection
[ʥ˼԰][Java SE]Reflection[ʥ˼԰][Java SE]Reflection
[ʥ˼԰][Java SE]Reflection
ArBing Xie
?
[ʥ˼԰][Java SE]OoadÓëuml lesson 2
[ʥ˼԰][Java SE]OoadÓëuml lesson 2[ʥ˼԰][Java SE]OoadÓëuml lesson 2
[ʥ˼԰][Java SE]OoadÓëuml lesson 2
ArBing Xie
?
[ʥ˼԰][Java SE]Observer
[ʥ˼԰][Java SE]Observer[ʥ˼԰][Java SE]Observer
[ʥ˼԰][Java SE]Observer
ArBing Xie
?
[ʥ˼԰][Java SE]Network
[ʥ˼԰][Java SE]Network[ʥ˼԰][Java SE]Network
[ʥ˼԰][Java SE]Network
ArBing Xie
?
[ʥ˼԰][Java SE]Jdk5
[ʥ˼԰][Java SE]Jdk5[ʥ˼԰][Java SE]Jdk5
[ʥ˼԰][Java SE]Jdk5
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 21
[ʥ˼԰][Java SE]Java se lesson 21[ʥ˼԰][Java SE]Java se lesson 21
[ʥ˼԰][Java SE]Java se lesson 21
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 20
[ʥ˼԰][Java SE]Java se lesson 20[ʥ˼԰][Java SE]Java se lesson 20
[ʥ˼԰][Java SE]Java se lesson 20
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 17
[ʥ˼԰][Java SE]Java se lesson 17[ʥ˼԰][Java SE]Java se lesson 17
[ʥ˼԰][Java SE]Java se lesson 17
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 16
[ʥ˼԰][Java SE]Java se lesson 16[ʥ˼԰][Java SE]Java se lesson 16
[ʥ˼԰][Java SE]Java se lesson 16
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 12
[ʥ˼԰][Java SE]Java se lesson 12[ʥ˼԰][Java SE]Java se lesson 12
[ʥ˼԰][Java SE]Java se lesson 12
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 11
[ʥ˼԰][Java SE]Java se lesson 11[ʥ˼԰][Java SE]Java se lesson 11
[ʥ˼԰][Java SE]Java se lesson 11
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 10
[ʥ˼԰][Java SE]Java se lesson 10[ʥ˼԰][Java SE]Java se lesson 10
[ʥ˼԰][Java SE]Java se lesson 10
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 9
[ʥ˼԰][Java SE]Java se lesson 9[ʥ˼԰][Java SE]Java se lesson 9
[ʥ˼԰][Java SE]Java se lesson 9
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 8
[ʥ˼԰][Java SE]Java se lesson 8[ʥ˼԰][Java SE]Java se lesson 8
[ʥ˼԰][Java SE]Java se lesson 8
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 5
[ʥ˼԰][Java SE]Java se lesson 5[ʥ˼԰][Java SE]Java se lesson 5
[ʥ˼԰][Java SE]Java se lesson 5
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 3
[ʥ˼԰][Java SE]Java se lesson 3[ʥ˼԰][Java SE]Java se lesson 3
[ʥ˼԰][Java SE]Java se lesson 3
ArBing Xie
?
[ʥ˼԰][Java SE]Swing
[ʥ˼԰][Java SE]Swing[ʥ˼԰][Java SE]Swing
[ʥ˼԰][Java SE]Swing
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 15
[ʥ˼԰][Java SE]Java se lesson 15[ʥ˼԰][Java SE]Java se lesson 15
[ʥ˼԰][Java SE]Java se lesson 15
ArBing Xie
?
[ʥ˼԰][Java SE]Websphere.application.developer(wsad)ʹÓÃÍâÖÃwin cvs½â¾ö·½°¸
[ʥ˼԰][Java SE]Websphere.application.developer(wsad)ʹÓÃÍâÖÃwin cvs½â¾ö·½°¸[ʥ˼԰][Java SE]Websphere.application.developer(wsad)ʹÓÃÍâÖÃwin cvs½â¾ö·½°¸
[ʥ˼԰][Java SE]Websphere.application.developer(wsad)ʹÓÃÍâÖÃwin cvs½â¾ö·½°¸
ArBing Xie
?
[ʥ˼԰][Java SE]Strategy
[ʥ˼԰][Java SE]Strategy[ʥ˼԰][Java SE]Strategy
[ʥ˼԰][Java SE]Strategy
ArBing Xie
?
[ʥ˼԰][Java SE]Reflection
[ʥ˼԰][Java SE]Reflection[ʥ˼԰][Java SE]Reflection
[ʥ˼԰][Java SE]Reflection
ArBing Xie
?
[ʥ˼԰][Java SE]OoadÓëuml lesson 2
[ʥ˼԰][Java SE]OoadÓëuml lesson 2[ʥ˼԰][Java SE]OoadÓëuml lesson 2
[ʥ˼԰][Java SE]OoadÓëuml lesson 2
ArBing Xie
?
[ʥ˼԰][Java SE]Observer
[ʥ˼԰][Java SE]Observer[ʥ˼԰][Java SE]Observer
[ʥ˼԰][Java SE]Observer
ArBing Xie
?
[ʥ˼԰][Java SE]Network
[ʥ˼԰][Java SE]Network[ʥ˼԰][Java SE]Network
[ʥ˼԰][Java SE]Network
ArBing Xie
?
[ʥ˼԰][Java SE]Jdk5
[ʥ˼԰][Java SE]Jdk5[ʥ˼԰][Java SE]Jdk5
[ʥ˼԰][Java SE]Jdk5
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 21
[ʥ˼԰][Java SE]Java se lesson 21[ʥ˼԰][Java SE]Java se lesson 21
[ʥ˼԰][Java SE]Java se lesson 21
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 20
[ʥ˼԰][Java SE]Java se lesson 20[ʥ˼԰][Java SE]Java se lesson 20
[ʥ˼԰][Java SE]Java se lesson 20
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 17
[ʥ˼԰][Java SE]Java se lesson 17[ʥ˼԰][Java SE]Java se lesson 17
[ʥ˼԰][Java SE]Java se lesson 17
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 16
[ʥ˼԰][Java SE]Java se lesson 16[ʥ˼԰][Java SE]Java se lesson 16
[ʥ˼԰][Java SE]Java se lesson 16
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 12
[ʥ˼԰][Java SE]Java se lesson 12[ʥ˼԰][Java SE]Java se lesson 12
[ʥ˼԰][Java SE]Java se lesson 12
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 11
[ʥ˼԰][Java SE]Java se lesson 11[ʥ˼԰][Java SE]Java se lesson 11
[ʥ˼԰][Java SE]Java se lesson 11
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 10
[ʥ˼԰][Java SE]Java se lesson 10[ʥ˼԰][Java SE]Java se lesson 10
[ʥ˼԰][Java SE]Java se lesson 10
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 9
[ʥ˼԰][Java SE]Java se lesson 9[ʥ˼԰][Java SE]Java se lesson 9
[ʥ˼԰][Java SE]Java se lesson 9
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 8
[ʥ˼԰][Java SE]Java se lesson 8[ʥ˼԰][Java SE]Java se lesson 8
[ʥ˼԰][Java SE]Java se lesson 8
ArBing Xie
?
[ʥ˼԰][Java SE]Java se lesson 5
[ʥ˼԰][Java SE]Java se lesson 5[ʥ˼԰][Java SE]Java se lesson 5
[ʥ˼԰][Java SE]Java se lesson 5
ArBing Xie
?

[ʥ˼԰][Java SE]Java se lesson 13

  • 1. Java SE Lesson 13 1. ÄÚ²¿ÀࣨInner Class£© £¬ÄÚ²¿À๲·ÖΪ 4 ÖÖ¡£ 2. ¾²Ì¬ÄÚ²¿Àࣨstatic inner class£© £ºÖ»ÄÜ·ÃÎÊÍⲿÀàµÄ¾²Ì¬³ÉÔ±±äÁ¿Ó뾲̬·½·¨£¬Éú³É ¾²Ì¬ÄÚ²¿Àà¶ÔÏóµÄ·½Ê½Îª£º OuterClass.InnerClass inner = new OuterClass.InnerClass(); 3. ³ÉÔ±ÄÚ²¿Àࣨmember inner class£© £º¿ÉÒÔ·ÃÎÊÍⲿÀàµÄ¾²Ì¬Óë·Ç¾²Ì¬µÄ·½·¨Óë³ÉÔ±±ä Á¿¡£Éú³É³ÉÔ±ÄÚ²¿Àà¶ÔÏóµÄ·½Ê½Îª£º OuterClass.InnerClass inner = new OuterClass().new InnerClass(); 4. ÈôÏëÔÚ¾Ö²¿ÄÚ²¿ÀàÖзÃÎÊÍⲿÀàµÄ³ÉÔ±±äÁ¿£¬Ó﷨Ϊ£ºOuterClass.this.a; 5. ¾Ö²¿ÄÚ²¿ÀࣨLocal Inner Class£© £º¶¨ÒåÔÚ·½·¨µ±ÖУ¬Ö»ÄÜ·ÃÎÊ·½·¨ÖÐÉùÃ÷µÄ final ÀàÐÍ µÄ±äÁ¿¡£ 6. ÄäÃûÄÚ²¿ÀࣨAnonymous Inner Class£© £ºÄäÃûÄÚ²¿Àà»áÒþʽµØ¼Ì³ÐÒ»¸ö¸¸Àà»òʵÏÖÒ» ¸ö½Ó¿Ú¡£ 7. ËùνµÝ¹é£¨Recursion£© £¬¾ÍÊÇ·½·¨µ÷ÓÃ×ÔÉí¡£¶ÔÓڵݹéÀ´Ëµ£¬Ò»¶¨ÓÐÒ»¸ö³ö¿Ú£¬ÈÃµÝ ¹é½áÊø£¬Ö»ÓÐÕâÑù²ÅÄܱ£Ö¤²»³öÏÖËÀÑ­»·¡£ 8. ×÷Òµ£º ¸ø¶¨ÈÎÒâÒ»¸öĿ¼£¬ ÒÔÊ÷Ðη½Ê½Õ¹ÏÖ³ö¸ÃĿ¼ÖеÄËùÓÐ×ÓĿ¼ºÍÎļþ¡£ ÁíÍ⣬ ÔÚÕ¹ÏÖµÄʱºò½«Ä¿Â¼ÅÅÔÚÉÏÃ棬ÎļþÅÅÔÚÏÂÃ档ÿһ²ãÒª¼ÓÉÏËõ½ø¡£