Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Ãô½Ý¿ª·¢Öбàд¸ßÖÊÁ¿Java´úÂë

Ãô½Ý¿ª·¢µÄÀíÄîÒѾ­Á÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡£
JavaÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚ¿ª·¢ÈËÔ±µÄ¾­Ñé¡¢Java´úÂë±àдϰ¹ß£¬ÒÔ¼°È±·¦Í³Ò»µÄ±ê×¼ºÍ¹ÜÀíÁ÷³Ì£¬ÍùÍùµ¼ÖÂÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿½Ï²î£¬ÄÑÓÚά »¤£¬ÐèÒª½Ï´óµÄ²âÊÔͶÈëºÍÖÜÆÚµÈÎÊÌâ¡£ÕâЩÎÊÌâÔÚÒ»¸öÏîÄ¿×é³õ½¨¡¢ÐèÇóºÍÉè¼Æ¾ù¾ßÓв»ÍêÈ«¿ÉÔ¤ÆÚÐÔºÍÍ걸ÐÔµÄÈ«ÐÂÏîÄ¿Öн«ÓÈΪͻ³ö¡£
Èçͼ1Ëùʾ£¬Ãô½Ý¿ª·¢¹ý³Ì¾­ÀúÐèÇóµ÷ÑУ¬ÓÃÀý·ÖÎöºÍÓÃÀý·Ö½â£¬½øÈ뿪·¢µü´ú½×¶Î¡£ÔÚÿ¸öµü´ú¹ý³ÌÖУ¬¿ÉÒÔ²ÉÓÃÒÔϲ½ÖèÀ´±£Ö¤ºÍÌá¸ßÕû¸öÏîÄ¿µÄ´ú ÂëÖÊÁ¿£ºÍ³Ò»±àÂë¹æ·¶¡¢´úÂëÑùʽ;¾²Ì¬´úÂë·ÖÎö(staticcodereview);µ¥Ôª²âÊÔ;³ÖÐø¼¯³É;´úÂëÆÀÉóºÍÖع¹ (Review&Refactor)¡£ÏÂÎĽ«Õë¶Ôÿ¸ö²½ÖèºÍÆäËùʹÓõŤ¾ß¡¢·½·¨½øÐÐÏêϸÃèÊö¡£
ͼ1.Ãô½Ý¿ª·¢ÖеÄJava´úÂëÖÊÁ¿±£Ö¤²½Öè
²½ÖèÒ»£ºÍ³Ò»±àÂë¹æ·¶¡¢´úÂëÑùʽ
¹æ·¶Í³Ò»µÄ±àÂë»áÔö¼ÓÏîÄ¿´úÂëµÄ¿É¶ÁÐԺͿÉά»¤ÐÔ£¬µ«Êµ¼ÊÇé¿öÍùÍùÊÇÏîÄ¿×éÄÚµÄJava´úÂ뿪·¢ÈËÔ±µÄ±àÂë·ç¸ñ³£³£¸÷²»Ïàͬ£¬Õâ¿ÉÄÜÊÇÓÉÓÚ²»Í¬ µÄ¾­ÑéÏ°¹ß»òÕßȱ·¦±àÂë¹æ·¶·½ÃæµÄѧϰÔì³ÉµÄ¡£ÕâÑùÒ»À´£¬ÆäËûÏîÄ¿³ÉÔ±»òÕßά»¤ÈËÔ±ÔÚÔĶÁÏîÄ¿´úÂëʱ¾ÍÐèÒª»¨·Ñ¸ü¶àµÄʱ¼äÀ´Àí½â´úÂë×÷ÕßµÄÒâͼ£¬ËùÒÔÖƶ¨ ²¢²ÉȡͳһµÄ±àÂë¹æ·¶¾ÍÏԵúÜÖØÒª¡£±àÂë¹æ·¶Ö÷ÒªÓ¦°üº¬ÒÔϼ¸¸ö·½Ã棺
¡ôÒ»°ã¹æÔòºÍ¸ñʽ¹æ·¶¡£ÀýÈç´úÂëËõ½ø¡¢³ÌÐò¿é¹æ·¶¡¢Ã¿ÐÐ×î´ó´úÂ볤¶ÈµÈ¡£
¡ôÃüÃû¹æÔò¡£ÀýÈç°üÃû¡¢ÀàÃû¡¢±äÁ¿¡¢·½·¨¡¢½Ó¿Ú¡¢²ÎÊýµÈÃüÃû¹æ·¶
¡ôÎĵµ¹æ·¶¡£ÀýÈçÀàÎļþÍ·ÉùÃ÷¡¢Àà×¢ÊÍ¡¢³ÉÔ±±äÁ¿ºÍ·½·¨×¢Ê͵ȹ淶¡£
¡ô±à³Ì¹æ·¶¡£ÀýÈçÒì³£¡¢²¢·¢¡¢¶àÏ̵߳ȷ½ÃæµÄ´¦Àí·½Ê½¡£
¡ôÆäËû¹æ·¶¡£ÀýÈçÈÕÖ¾¸ñʽ¡¢ÊôÐÔÎļþ¸ñʽ£¬·µ»ØÖµºÍÏûÏ¢¸ñʽ¡£
ÏîÄ¿µÄ±àÂë¹æ·¶¿ÉÒԲο¼ÒÑÓеÄһЩJava±à³Ì¹æ·¶Êé¼®ºÍÆäËûÏà¹Ø×ÊÁϲ¢½áºÏÏîÄ¿µÄ±¾ÉíÀ´Öƶ¨£¬¿É¹©²Î¿¼µÄÊé¼®ÓС¶Java±à³Ì·ç¸ñ¡·(Ó¢ÎÄÊé ÃûΪ£ºTheElementsofJavaStyle)¡£±àÂë¹æ·¶ÒªÐγÉÎĵµ£¬¶øÇÒÒª¼ò½àÃ÷ÁË£¬²¢×éÖ¯ÏîÄ¿³ÉÔ±Ò»Æðѧϰ£¬È·±£ËùÓгÉÔ±ÕýÈ·Àí½âËùÓÐÌõÄ¿¡£
Ò»µ©±àÂë¹æ·¶È·¶¨£¬¾Í¿ÉÒÔÀûÓÃEclipse×ÔÉíÌṩµÄ¹¦ÄÜÀ´¿ØÖÆ´úÂëÑùʽºÍ¸ñʽ¡£¾ßÌå×ö·¨ÊÇ£¬µã»÷EclipseµÄ Windows->Preference²Ëµ¥ÏÔÚ´ò¿ªµÄPreferences¶Ô»°¿òµÄ×ó²àÀ¸ÖÐÕÒµ½Java½ÚµãϵÄ×ÓÏîCodeStyle(Èçͼ2)£¬¸ÃÏî ºÍËüµÄ×ÓÏîÔÊÐíÄú¶ÔJava´úÂëµÄÑùʽ½øÐпØÖÆ¡£
ͼ2.Eclipse´úÂëÑùʽÉèÖô°¿Ú
ÀýÈ磬ΪÁËʹÓÃ×Ô¶¯¸ñʽ»¯¹¤¾ß£¬¿ÉÒÔÔÚEclipseÌṩµÄĬÈÏ´úÂë¸ñʽÅäÖ


Ïà¹ØÎĵµ£º

JAVAÖÐÓÃÓÚ´¦Àí×Ö·û´®µÄ¡°ÈýÐֵܡ±

JAVAÖÐÓÃÓÚ´¦Àí×Ö·û´®µÄ“ÈýÐֵܔ
JAVAÖÐÓÃÓÚ´¦Àí×Ö·û´®³£ÓõÄÓÐÈý¸öÀࣺjava.lang.String¡¢java.lang.StringBuffer¡¢java.lang.StringBuilder£¬ÕâÈýÕߵĹ²Í¬Ö®´¦¶¼ÊÇfinalÀ࣬²»ÔÊÐí±»¼Ì³Ð£¬ÕâÖ÷ÒªÊÇ´ÓÐÔÄܺͰ²È«ÐÔÉÏ¿¼Âǵģ¬ÒòΪÕ⼸¸öÀ඼ÊǾ­³£±»Ê¹ÓÃ×ŵģ¬ÇÒ¿¼Âǵ½·ÀÖ¹ÆäÖеIJÎÊý±»ÐÞ¸ÄÓ°Ïìµ½ÆäËüµÄÓ¦Óᣠ......

Java֪ʶ

1.MVCµÄ¸÷¸ö²¿·Ö¶¼ÓÐÄÇЩ¼¼ÊõÀ´ÊµÏÖ?ÈçºÎʵÏÖ?
´ð£ºMVCÊÇModel£­View£­ControllerµÄ¼òд¡£"Model" ´ú±íµÄÊÇÓ¦ÓõÄÒµÎñÂß¼­£¨Í¨¹ýJavaBean£¬EJB×é¼þʵÏÖ£©£¬ "View" ÊÇÓ¦ÓõıíʾÃ棨ÓÉJSPÒ³Ãæ²úÉú£©£¬"Controller" ÊÇÌṩӦÓõĴ¦Àí¹ý³Ì¿ØÖÆ£¨Ò»°ãÊÇÒ»¸öServlet£©£¬Í¨¹ýÕâÖÖÉè¼ÆÄ£ÐÍ°ÑÓ¦ÓÃÂß¼­£¬´¦Àí¹ý³ÌºÍÏÔʾÂß¼­·Ö³É²» ......

JavaÖ®¸¸÷öÈ»ÀëÖ° ¿ªÔ´½«ºÎÈ¥ºÎ´Ó

Java´´Ê¼ÈËղķ˹·¸ß˹ÁÖ(James Gosling)ÈÕÇ°ÔÚ²©¿ÍÖгÆ,ÒѾ­ÔÚ4ÔÂ2ÈÕ´Ó¼×¹ÇÎÄ(Oracle£©ÍËÐÝ¡£ºÜ¶àÈ˵ĵÚÒ»·´Ó¦ÊÇ£¬ËûÊÇ·ñ»áͶ±¼Î¢Èí¡¢GoogleÖ®ÀàµÄ¹«Ë¾ÄØ£¿²»¹ýGosling±íʾĿǰ»¹Ã»ÓнøÒ»²½´òËã¡£ 
¹ØÓÚÀëÖ°µÄ¾ßÌåÔ­Òò£¬¸ß˹ÁÖûÓÐ͸¶¡£Ö»ÊÇÔÚ²©¿ÍÖÐдµÀ£º“Êǵģ¬ÄÇЩ´«ÑÔ¶¼ÊÇÕæµÄ£ºÎÒÒѾ­ÔÚÒ»ÖÜÇ°£¨4 ......

Java »ù´¡ÖªÊ¶£¡£¡


¶ÔÓÚÕâ¸öϵÁÐÀïµÄÎÊÌ⣬ÿ¸öѧJavaµÄÈ˶¼Ó¦¸Ã¸ã¶®¡£µ±È»£¬Èç¹ûÖ»ÊÇѧJavaÍæÍæ¾ÍÎÞËùνÁË¡£Èç¹ûÄãÈÏΪ×Ô¼ºÒѾ­³¬Ô½³õѧÕßÁË£¬È´²»ºÜ¶®ÕâЩÎÊÌ⣬Ç뽫Äã×Ô¼ºÖعé³õѧÕßÐÐÁС£ÄÚÈݾùÀ´×ÔÓÚCSDNµÄ¾­µäÀÏÌù¡£
ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄÊÂÇ飬µ«ÊÇ£¬ÎÒÃǵ½µ×ÉùÃ÷ÁËʲô£¿»Ø´ðͨ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ