JAVA»ù´¡ÖªÊ¶¾«»ª×ܽá
1¡¢ ¶ÔÏóµÄ³õʼ»¯
(1) ·Ç¾²Ì¬¶ÔÏóµÄ³õʼ»¯
ÔÚ´´½¨¶ÔÏóʱ£¬¶ÔÏóËùÔÚÀàµÄËùÓÐÊý¾Ý³ÉÔ±»áÊ×ÏȽøÐгõʼ»¯¡£
»ù±¾ÀàÐÍ£ºintÐÍ£¬³õʼ»¯Îª0¡£
Èç¹ûΪ¶ÔÏó£ºÕâЩ¶ÔÏó»á°´Ë³Ðò³õʼ»¯¡£
¡ùÔÚËùÓÐÀà³ÉÔ±³õʼ»¯Íê³ÉÖ®ºó£¬²Åµ÷Óñ¾ÀàµÄ¹¹Ôì·½·¨´´½¨¶ÔÏó¡£
¹¹Ôì·½·¨µÄ×÷ÓþÍÊdzõʼ»¯¡£
(2) ¾²Ì¬¶ÔÏóµÄ³õʼ»¯
³ÌÐòÖÐÖ÷ÀàµÄ¾²Ì¬±äÁ¿»áÔÚmain·½·¨Ö´ÐÐÇ°³õʼ»¯¡£
²»½öµÚÒ»´Î´´½¨¶ÔÏóʱ£¬ÀàÖеÄËùÓо²Ì¬±äÁ¿¶¼³õʼ»¯£¬²¢ÇÒµÚÒ»´Î·ÃÎÊijÀࣨעÒâ´Ëʱ
δ´´½¨´ËÀà¶ÔÏ󣩵ľ²Ì¬¶ÔÏóʱ£¬ËùÓеľ²Ì¬±äÁ¿Ò²Òª°´ËüÃÇÔÚÀàÖеÄ˳Ðò³õʼ»¯¡£
2¡¢ ¼Ì³Ðʱ£¬¶ÔÏóµÄ³õʼ»¯¹ý³Ì
(1) Ö÷ÀàµÄ³¬ÀàÓɸߵ½µÍ°´Ë³Ðò³õʼ»¯¾²Ì¬³ÉÔ±£¬ÎÞÂÛ¾²Ì¬³ÉÔ±ÊÇ·ñΪprivate¡£
(2) Ö÷Àྲ̬³ÉÔ±µÄ³õʼ»¯¡£
(3) Ö÷ÀàµÄ³¬ÀàÓɸߵ½µÍ½øÐÐĬÈϹ¹Ôì·½·¨µÄµ÷Óá£×¢Ò⣬ÔÚµ÷ÓÃÿһ¸ö³¬ÀàµÄĬÈϹ¹Ôì
·½·¨Ç°£¬ÏȽøÐжԴ˳¬Àà½øÐзǾ²Ì¬¶ÔÏóµÄ³õʼ»¯¡£
(4) Ö÷Àà·Ç¾²Ì¬³ÉÔ±µÄ³õʼ»¯¡£
(5) µ÷ÓÃÖ÷ÀàµÄ¹¹Ôì·½·¨¡£
3¡¢ ¹ØÓÚ¹¹Ôì·½·¨
(1) Àà¿ÉÒÔûÓй¹Ôì·½·¨£¬µ«Èç¹ûÓжà¸ö¹¹Ôì·½·¨£¬¾ÍÓ¦¸ÃÒªÓÐĬÈϵĹ¹Ôì·½·¨£¬·ñÔòÔڼ̳дËÀàʱ£¬ÐèÒªÔÚ×ÓÀàÖÐÏÔʽµ÷Óø¸ÀàµÄijһ¸ö·ÇĬÈϵĹ¹Ôì·½·¨ÁË¡£
(2) ÔÚÒ»¸ö¹¹Ôì·½·¨ÖУ¬Ö»Äܵ÷ÓÃÒ»´ÎÆäËûµÄ¹¹Ôì·½·¨£¬²¢ÇÒµ÷Óù¹Ôì·½·¨µÄÓï¾ä±ØÐëÊÇ
µÚÒ»ÌõÓï¾ä¡£
4¡¢ ÓйØpublic¡¢privateºÍprotected
(1) ÎÞpublicÐÞÊεÄÀ࣬¿ÉÒÔ±»ÆäËûÀà·ÃÎʵÄÌõ¼þÊÇ£ºa.Á½¸öÀàÔÚͬһÎļþÖУ¬b.Á½¸öÀà
ÔÚͬһÎļþ¼ÐÖУ¬c.Á½¸öÀàÔÚͬһÈí¼þ°üÖС£
(2) protected£º¼Ì³ÐÀàºÍͬһÈí¼þ°üµÄÀà¿É·ÃÎÊ¡£
(3) Èç¹û¹¹Ôì·½·¨Îªprivate£¬ÄÇôÔÚÆäËûÀàÖв»ÄÜ´´½¨¸ÃÀàµÄ¶ÔÏó¡£
5¡¢ ³éÏóÀà
(1) ³éÏóÀ಻ÄÜ´´½¨¶ÔÏó¡£
(2) Èç¹ûÒ»¸öÀàÖÐÒ»¸ö·½·¨Îª³éÏó·½·¨£¬ÔòÕâ¸öÀà±ØÐëΪabstract³éÏóÀà¡£
(3) ¼Ì³Ð³éÏóÀàµÄÀàÔÚÀàÖбØÐëʵÏÖ³éÏóÀàÖеijéÏó·½·¨¡£
(4) ³éÏóÀàÖпÉÒÔÓгéÏó·½·¨£¬Ò²¿ÉÓзdzéÏó·½·¨¡£³éÏó·½·¨²»ÄÜΪprivate¡£
(5) ¼ä½Ó¼Ì³Ð³éÏóÀàµÄÀà¿ÉÒÔ²»¸ø³ö³éÏó·½·¨µÄ¶¨Òå¡£
6¡¢ final¹Ø¼ü×Ö
(1) Ò»¸ö¶ÔÏóÊdz£Á¿£¬²»´ú±í²»ÄÜת±ä¶ÔÏóµÄ³ÉÔ±£¬ÈÔ¿ÉÒÔÆä³ÉÔ±½øÐвÙ×÷¡£
(2) ³£Á¿ÔÚʹÓÃÇ°±ØÐ븳ֵ£¬µ«³ýÁËÔÚÉùÃ÷µÄͬʱ³õʼ»¯Í⣬¾ÍÖ»ÄÜÔÚ¹¹Ôì·½·¨Öгõʼ»¯
¡£
(3) finalÐÞÊεķ½·¨²»Äܱ»ÖØÖã¨ÔÚ×ÓÀàÖв»ÄܳöÏÖͬÃû·½·¨£©¡£
(4) Èç¹ûÉùÃ÷Ò»¸öÀàΪfinal£¬ÔòËùÓеķ½·¨¾ùΪfinal£¬ÎÞÂÛÆäÊÇ·ñ±»finalÐÞÊΣ¬µ«Êý¾Ý
³ÉÔ±¿ÉΪfinalÒ²¿É²»ÊÇ¡£
7¡¢ ½Ó¿Úinterface
Ïà¹ØÎĵµ£º
ÎÄÕÂÀ´Ô´£ºhttp://www.blogjava.net/midea0978/archive/2008/01/17/175953.html
1¡¢Ê×Ïȵ½ÇëÏÂÔØ×îа汾µÄJava Service Wrapper£¬µãÎÒÏÂÔØ¡£
2¡¢×¼±¸ÈçÏÂÎļþ£¬¸´ÖƵ½testĿ¼£¬ÕâЩÎļþ¿ÉÒÔ´ÓÏÂÔØ°üÖÐÕÒµ½£º
wrapper.dll
wrapper.exe
wrapper.jar
3¡¢±àдwrapper.conf£¬Ò²·ÅÔÚͬһ¼¶Ä¿Â¼ÏÂÃ棬ÄÚÈÝÈçÏÂ
# Jav ......
Óï·¨£º
for ( type ±äÁ¿Ãû£º¼¯ºÏ±äÁ¿Ãû ) { … }
×¢ÒâÊÂÏ
µü´ú±äÁ¿±ØÐëÔÚ( )Öж¨Ò壡
¼¯ºÏ±äÁ¿¿ÉÒÔÊÇÊý×é»òʵÏÖÁËIterable½Ó¿ÚµÄ¼¯ºÏÀà
¾ÙÀý£º
public class AdvancedFor {
public static void main(String[] arg ......
l×é¼þ´Ó¹¦ÄÜÉÏ·Ö¿É·ÖΪ£º
1) ¶¥²ãÈÝÆ÷£ºJFrame,JApplet,JDialog,JWindow
2) ÖмäÈÝÆ÷£ºJPanel,JScrollPane,JSplitPane,JToolBar¡¡
3) ÌØÊâÈÝÆ÷£ºÔÚGUIÉÏÆðÌØÊâ×÷ÓõÄÖмä²ã£¬ÈçJInternalFrame,JLayeredPane,JRootPane.
1.JFrameµÄÓ÷¨
1) ÓÃgetContentPane( )·½·¨»ñµÃJFrameµÄ ......
1£® ¹ØÓÚ»ù´¡Êý¾ÝÀàÐÍ¡£
»¹¼ÇµÃÉÏһƬÎÄÕÂÖнáβ²¿·ÖµÄÄǸöÀý×Óô£¿
ÒòΪ¼ÆËã»úµÄ2½øÖƵÄÌØÐÔ£¬JavaÓïÑÔ£¨ÆäËûÓïÑÔºÃÏñÒ²Ò»Ñù£©ÎÞ·¨×¼È·µØ½øÐÐfloat,doubleÀàÐÍÊý¾ÝµÄ¼ÆË㣬ËùÒÔ£¬×÷ÕâЩ¼ÆËãµÄʱºòÐèÒª¿¼ÂÇʹÓÃBigDecimalן÷Àà¡£
2£® StringÀàÓëStringBufferÀà
JavaµÄStringÀàÌṩÈçϵļòµ¥µÄ×Ö·û´®Á¬½Ó·½· ......