ºÝºÝߣ

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



1. Ëùν×Ô¶¨ÒåÒì³££¬Í¨³£¾ÍÊǶ¨ÒåÁËÒ»¸ö¼Ì³Ð×Ô Exception ÀàµÄ×ÓÀ࣬ÄÇôÕâ¸öÀà¾ÍÊÇ
   Ò»¸ö×Ô¶¨ÒåÒì³£Àࡣͨ³£Çé¿öÏ£¬ÎÒÃǶ¼»áÖ±½Ó¼Ì³Ð×Ô Exception À࣬һ°ã²»»á¼Ì³Ð
   ij¸öÔËÐÐʱµÄÒì³£Àà¡£
2. ÎÒÃÇ¿ÉÒÔʹÓöà¸ö catch ¿éÀ´²¶»ñÒì³££¬ÕâʱÐèÒª½«¸¸ÀàÐ굀 catch ¿é·Åµ½×ÓÀàÐ͵Ä
   catch ¿éÖ®ºó£¬ÕâÑù²ÅÄܱ£Ö¤ºóÐøµÄ catch ¿ÉÄܱ»Ö´ÐУ¬·ñÔò×ÓÀàÐ굀 catch ½«ÓÀÔ¶
   ÎÞ·¨µ½´ï£¬Java ±àÒëÆ÷»á±¨±àÒë´íÎó£»Èç¹û¶à¸ö catch ¿éµÄÒì³£ÀàÐÍÊǶÀÁ¢µÄ
   (MyException, MyException2)£¬ ÄÇô˭ǰ˭ºó¶¼ÊÇ¿ÉÒԵġ£
3. Èç¹û try ¿éÖдæÔÚ return Óï¾ä£¬ÄÇôÊ×ÏÈÒ²ÐèÒª½« finally ¿éÖеĴúÂëÖ´ÐÐÍê±Ï£¬È»
   ºó·½·¨ÔÙ·µ»Ø¡£
4. Èç¹û try ¿éÖдæÔÚ System.exit(0)Óï¾ä£¬ÄÇô¾Í²»»áÖ´ÐÐ finally ¿éÖеĴúÂ룬ÒòΪ
   System.exit(0)»áÖÕÖ¹µ±Ç°ÔËÐÐµÄ Java ÐéÄâ»ú£¬³ÌÐò»áÔÚÐéÄâ»úÖÕֹǰ½áÊøÖ´ÐС£
                               £¬Í¼ÐÎÓû§½çÃæ¡£
5. GUI£¨Graphical User Interface£©
6. AWT£¨Abstract Window Toolkit£© £¬³éÏó´°¿Ú¹¤¾ß¼¯£¬µÚÒ»´úµÄ Java GUI ×é¼þ£¬ÊÇÖØÁ¿
   ¼¶µÄ¡£
7. Swing£¬²»ÒÀÀµÓڵײãϸ½Ú£¬ÇáÁ¿¼¶µÄ×é¼þ¡£

More Related Content

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 22
[ʥ˼԰][Java SE]Java se lesson 22[ʥ˼԰][Java SE]Java se lesson 22
[ʥ˼԰][Java SE]Java se lesson 22
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 13
[ʥ˼԰][Java SE]Java se lesson 13[ʥ˼԰][Java SE]Java se lesson 13
[ʥ˼԰][Java SE]Java se lesson 13
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 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 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 22
[ʥ˼԰][Java SE]Java se lesson 22[ʥ˼԰][Java SE]Java se lesson 22
[ʥ˼԰][Java SE]Java se lesson 22
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 13
[ʥ˼԰][Java SE]Java se lesson 13[ʥ˼԰][Java SE]Java se lesson 13
[ʥ˼԰][Java SE]Java se lesson 13
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 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
?

Recently uploaded (6)

2025 NVIDIA GTC: Crack the AI Black Box: Practical Techniques for Explainable AI
2025 NVIDIA GTC: Crack the AI Black Box: Practical Techniques for Explainable AI2025 NVIDIA GTC: Crack the AI Black Box: Practical Techniques for Explainable AI
2025 NVIDIA GTC: Crack the AI Black Box: Practical Techniques for Explainable AI
David vonThenen
?
Cantonmade 2025 Hotel Supplier Catalog: Technical Specs for Engineers & Integ...
Cantonmade 2025 Hotel Supplier Catalog: Technical Specs for Engineers & Integ...Cantonmade 2025 Hotel Supplier Catalog: Technical Specs for Engineers & Integ...
Cantonmade 2025 Hotel Supplier Catalog: Technical Specs for Engineers & Integ...
RayChan91
?
Build_With_AI_2025 Gemini 2.0 New Function
Build_With_AI_2025  Gemini 2.0 New FunctionBuild_With_AI_2025  Gemini 2.0 New Function
Build_With_AI_2025 Gemini 2.0 New Function
kevinchiu59
?
Æ¥×ȱ¤´óѧ±ÏÒµÖ¤(±Ê±õ°Õ°Õѧλ֤·¶±¾±ÏÒµÖ¤Êé)°ìÀí
Æ¥×ȱ¤´óѧ±ÏÒµÖ¤(±Ê±õ°Õ°Õѧλ֤·¶±¾±ÏÒµÖ¤Êé)°ìÀíÆ¥×ȱ¤´óѧ±ÏÒµÖ¤(±Ê±õ°Õ°Õѧλ֤·¶±¾±ÏÒµÖ¤Êé)°ìÀí
Æ¥×ȱ¤´óѧ±ÏÒµÖ¤(±Ê±õ°Õ°Õѧλ֤·¶±¾±ÏÒµÖ¤Êé)°ìÀí
kaozytf
?
2025 DeveloperWeek - The Sound of Innovation: Why Voice Cloning Will Redefine...
2025 DeveloperWeek - The Sound of Innovation: Why Voice Cloning Will Redefine...2025 DeveloperWeek - The Sound of Innovation: Why Voice Cloning Will Redefine...
2025 DeveloperWeek - The Sound of Innovation: Why Voice Cloning Will Redefine...
David vonThenen
?
°¢²®¶¡´óѧ±ÏÒµÖ¤(±«´Ç´¡Ñ§Î»Ö¤Ñ§ÀúÈÏÖ¤¹úÍâÁôѧ)°ìÀí
°¢²®¶¡´óѧ±ÏÒµÖ¤(±«´Ç´¡Ñ§Î»Ö¤Ñ§ÀúÈÏÖ¤¹úÍâÁôѧ)°ìÀí°¢²®¶¡´óѧ±ÏÒµÖ¤(±«´Ç´¡Ñ§Î»Ö¤Ñ§ÀúÈÏÖ¤¹úÍâÁôѧ)°ìÀí
°¢²®¶¡´óѧ±ÏÒµÖ¤(±«´Ç´¡Ñ§Î»Ö¤Ñ§ÀúÈÏÖ¤¹úÍâÁôѧ)°ìÀí
kaozytf
?
2025 NVIDIA GTC: Crack the AI Black Box: Practical Techniques for Explainable AI
2025 NVIDIA GTC: Crack the AI Black Box: Practical Techniques for Explainable AI2025 NVIDIA GTC: Crack the AI Black Box: Practical Techniques for Explainable AI
2025 NVIDIA GTC: Crack the AI Black Box: Practical Techniques for Explainable AI
David vonThenen
?
Cantonmade 2025 Hotel Supplier Catalog: Technical Specs for Engineers & Integ...
Cantonmade 2025 Hotel Supplier Catalog: Technical Specs for Engineers & Integ...Cantonmade 2025 Hotel Supplier Catalog: Technical Specs for Engineers & Integ...
Cantonmade 2025 Hotel Supplier Catalog: Technical Specs for Engineers & Integ...
RayChan91
?
Build_With_AI_2025 Gemini 2.0 New Function
Build_With_AI_2025  Gemini 2.0 New FunctionBuild_With_AI_2025  Gemini 2.0 New Function
Build_With_AI_2025 Gemini 2.0 New Function
kevinchiu59
?
Æ¥×ȱ¤´óѧ±ÏÒµÖ¤(±Ê±õ°Õ°Õѧλ֤·¶±¾±ÏÒµÖ¤Êé)°ìÀí
Æ¥×ȱ¤´óѧ±ÏÒµÖ¤(±Ê±õ°Õ°Õѧλ֤·¶±¾±ÏÒµÖ¤Êé)°ìÀíÆ¥×ȱ¤´óѧ±ÏÒµÖ¤(±Ê±õ°Õ°Õѧλ֤·¶±¾±ÏÒµÖ¤Êé)°ìÀí
Æ¥×ȱ¤´óѧ±ÏÒµÖ¤(±Ê±õ°Õ°Õѧλ֤·¶±¾±ÏÒµÖ¤Êé)°ìÀí
kaozytf
?
2025 DeveloperWeek - The Sound of Innovation: Why Voice Cloning Will Redefine...
2025 DeveloperWeek - The Sound of Innovation: Why Voice Cloning Will Redefine...2025 DeveloperWeek - The Sound of Innovation: Why Voice Cloning Will Redefine...
2025 DeveloperWeek - The Sound of Innovation: Why Voice Cloning Will Redefine...
David vonThenen
?
°¢²®¶¡´óѧ±ÏÒµÖ¤(±«´Ç´¡Ñ§Î»Ö¤Ñ§ÀúÈÏÖ¤¹úÍâÁôѧ)°ìÀí
°¢²®¶¡´óѧ±ÏÒµÖ¤(±«´Ç´¡Ñ§Î»Ö¤Ñ§ÀúÈÏÖ¤¹úÍâÁôѧ)°ìÀí°¢²®¶¡´óѧ±ÏÒµÖ¤(±«´Ç´¡Ñ§Î»Ö¤Ñ§ÀúÈÏÖ¤¹úÍâÁôѧ)°ìÀí
°¢²®¶¡´óѧ±ÏÒµÖ¤(±«´Ç´¡Ñ§Î»Ö¤Ñ§ÀúÈÏÖ¤¹úÍâÁôѧ)°ìÀí
kaozytf
?

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

  • 1. Java SE Lesson 11 1. Ëùν×Ô¶¨ÒåÒì³££¬Í¨³£¾ÍÊǶ¨ÒåÁËÒ»¸ö¼Ì³Ð×Ô Exception ÀàµÄ×ÓÀ࣬ÄÇôÕâ¸öÀà¾ÍÊÇ Ò»¸ö×Ô¶¨ÒåÒì³£Àࡣͨ³£Çé¿öÏ£¬ÎÒÃǶ¼»áÖ±½Ó¼Ì³Ð×Ô Exception À࣬һ°ã²»»á¼Ì³Ð ij¸öÔËÐÐʱµÄÒì³£Àà¡£ 2. ÎÒÃÇ¿ÉÒÔʹÓöà¸ö catch ¿éÀ´²¶»ñÒì³££¬ÕâʱÐèÒª½«¸¸ÀàÐ굀 catch ¿é·Åµ½×ÓÀàÐ굀 catch ¿éÖ®ºó£¬ÕâÑù²ÅÄܱ£Ö¤ºóÐøµÄ catch ¿ÉÄܱ»Ö´ÐУ¬·ñÔò×ÓÀàÐ굀 catch ½«ÓÀÔ¶ ÎÞ·¨µ½´ï£¬Java ±àÒëÆ÷»á±¨±àÒë´íÎó£»Èç¹û¶à¸ö catch ¿éµÄÒì³£ÀàÐÍÊǶÀÁ¢µÄ (MyException, MyException2)£¬ ÄÇô˭ǰ˭ºó¶¼ÊÇ¿ÉÒԵġ£ 3. Èç¹û try ¿éÖдæÔÚ return Óï¾ä£¬ÄÇôÊ×ÏÈÒ²ÐèÒª½« finally ¿éÖеĴúÂëÖ´ÐÐÍê±Ï£¬È» ºó·½·¨ÔÙ·µ»Ø¡£ 4. Èç¹û try ¿éÖдæÔÚ System.exit(0)Óï¾ä£¬ÄÇô¾Í²»»áÖ´ÐÐ finally ¿éÖеĴúÂ룬ÒòΪ System.exit(0)»áÖÕÖ¹µ±Ç°ÔËÐÐµÄ Java ÐéÄâ»ú£¬³ÌÐò»áÔÚÐéÄâ»úÖÕֹǰ½áÊøÖ´ÐС£ £¬Í¼ÐÎÓû§½çÃæ¡£ 5. GUI£¨Graphical User Interface£© 6. AWT£¨Abstract Window Toolkit£© £¬³éÏó´°¿Ú¹¤¾ß¼¯£¬µÚÒ»´úµÄ Java GUI ×é¼þ£¬ÊÇÖØÁ¿ ¼¶µÄ¡£ 7. Swing£¬²»ÒÀÀµÓڵײãϸ½Ú£¬ÇáÁ¿¼¶µÄ×é¼þ¡£