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

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

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


Ïà¹ØÎĵµ£º

ubntuÏÂjavaÖÐÎÄÂÒÂë½â¾ö

cd /usr/lib/jvm/java
-1.5.0-sun-1.5.0.15/jre/lib/fonts
sudo mkdir fallback
cd fallback
sudo cp /usr/share/fonts/truetype/arphic/uming.ttc /usr/lib/jvm/java
-1.5.0-sun-1.5.0.15/jre/lib/fonts/fallback
sudo mkfontdir
sudo mkfontscale ......

JAVA³£Ó÷½·¨

01¡¢ÈÿؼþµÃµ½½¹µã
    ÓÃ.requestFocus();¿ÉÒÔ»ñµÃ¿Ø¼þ½¹µã¡£
    nextFocus()Ôò¿É½øÈëÏÂÒ»¸ö½¹µã¡£
02¡¢½«StringÀàÐÍתΪintÀàÐÍ
    Integer.parseInt(String);
03¡¢½«IntegerÀàÐÍתΪStringÀàÐÍ
    String.valueOf(Integer); ......

javaÉú³ÉËæ»úÊý×ÖºÍ×Öĸ×éºÏ


×¢£º1.·½·¨µÄ²ÎÊý length ÊÇÉú³ÉµÄËæ»úÊýµÄ³¤¶È¡£
      2. Ö»ÏëÒª´óдµÄ×Öĸ ¿ÉÒÔʹ int choice =65£» Ö»ÏëҪСдµÄ×Öĸ£¬¾Í int choice =97£»
import java.util.Random;
public String getCharAndNumr(int length)  
{  
    String val = " ......

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

Ãô½Ý¿ª·¢Öбàд¸ßÖÊÁ¿Java´úÂë
2010-03-08 10:32
 | 
1709
´ÎÔĶÁ
 | 
¡¾ÒÑÓÐ9
ÌõÆÀÂÛ¡¿·¢±íÆÀÂÛ
À´Ô´£º±ÈÌØÍø À´Ô´£ºIBM/ÍõÓÀ¿ý
 | 
Êղص½ÎÒµÄÍøÕª
Ãô½Ý¿ª·¢µÄÀíÄîÒѾ­Á÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ