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

JAVA²ÎÊý´«µÝÖµ´«µÝµÄÀí½â¡£

Ê×ÏÈÃ÷ȷһϣºjavaÀïÃæÖ»ÓÐÖµ´«µÝ£¬ÒýÓô«µÝÖ»ÊÇÒ»Ö»Îó¶Á¶øÒÑ¡£
À´¿´Ò»¸öÀý×Ó£º
public static void main(String[] args)
{
StringBuffer str1 = new StringBuffer("hello");
test(str1);
System.out.println("main : " + str1);
}
public static void test(StringBuffer str)
{
StringBuffer tempStr = new StringBuffer();
System.out.println("first : " + str);
str = str.append(" world");
System.out.println("second: " + str);
str = tempStr;
System.out.println("third : " + str);
}

½á¹û
first : hello
second: hello world
third :
main  : hello world
      Ç°ÃæÈý¸ö´òÓ¡½á¹û¶¼ºÜºÃÀí½â£¬×îºóÒ»¸ömainÀïÃæ´òÓ¡³öµÄΪʲôÊÇ hello worldÄØ£¿
      ÈÃÎÒÃÇÒ»²½Ò»²½À´·ÖÎö£º
      test(str1);
      µ÷ÓÃtest()·½·¨¡£StringBuffer ¶ÔÏó("hello")µÄÒýÓÃ×öΪ²ÎÊý´«¸øtest()·½·¨¡£ÓÐÈ˾ÍÒªÎÊÁË£ºÄãÕâÀï²»¾ÍÊÇ´«µÄÒýÓÃô£¿ÎªÊ²Ã´»¹ËµjavaÀïÃ涼ÊÇÖµ´«µÝÄØ£¿¹Ø¼ü¾ÍÔÚÕâÀÆäʵÕâÀïµÄÖµ´«µÝµÄ'Öµ'µÄÒâ˼ÊÇ----ÒýÓõÄÖµ£¬ÎÒÃÇÖªµÀÒýÓÃÆäʵҲÊÇÒ»¸ö¶ÔÏó£¬ÕâÀï´«µÝµÄ¾ÍÊÇÒýÓõı¾Éí¡£¶ø¶Ô´«µÝµÄÀí½â£¬²¢²»ÊǾÍÊÇ°ÑÕâ¸öÒýÓÃÄùýÈ¥£¬¶øÊǽ«Æ临ÖÆÒ»·Ý£¬½«¸±±¾´«¸øtest()·½·¨¡£ËùÒÔÎÒÃǽøµ½test·½·¨ÀïÃæµÄʱºò£¬strÊÇÒ»¸öеĶ«¶«£¬ËüÓëmainº¯ÊýÀïÃæµÄstr1ͬÑùÖ¸Ïò£¨ºÜ¶àÈ˲»Àí½âÕâ¸öÖ¸Ïòµ½µ×ΪºÎÒ⣬ÎÒÃÇ˵һ¸öÒýÓÃÆäʵҲÊÇÒ»¸ö¶ÔÏó£¬ÄÇôÕâ¸ö¶ÔÏóÀïÃæ°üº¬µÄÄÚÈÝ£¬»òÊÇ˵ËüµÄ²ÎÊý¾ÍÊÇËüËùÖ¸ÏòµÄ¶ÔÏóµÄµØÖ·£©"hello"Õâ¸öStringBuffer¶ÔÏó£¬ÕâÊÇÒ»¸ö¹Ø¼üµã¡£
      ÔÙÍùÏ¿´ÎÊÌâ¾ÍÓ­Èжø½âÁË£¬
      str = str.append(" world");
      ÓÉÓÚstrͬÑùÒ²ÊÇÖ¸Ïò"hello"¶ÔÏó£¬ËùÒԸòÙ×÷»á¸Ä±ä¶ÔÏó±¾Éí"hello"±ä³É"hello world";
      ÔÚÍùÏÂ
      str = tempStr;
      ÕâÀïҲҪעÒ⣬Õâ¸ö²Ù×÷ºÍ֮ǰµÄÓÐËù²»Í¬£¬Õâ¸öÊÇÒýÓõĸ³ÖµÔËË㣬Ҳ¾ÍÊÇ˵¸Ä±äµÄ¾Í²»ÊÇÒýÓÃÖ¸ÏòµÄ¶ÔÏóÁ˶øÊÇÒýÓñ¾Éí£¬½«tempStrÒýÓõÄÄÚÈݸ³¸østrÒýÓã¬Ò


Ïà¹ØÎĵµ£º

Java¿ªÔ´Bug¸ú×Ùϵͳ


 ITracker 
ITracker»ùÓÚJ2EEµÄissue/bug¸ú×Ùϵͳ£¬Ö§³Ö¶àÓû§¡¢¶àÏîÄ¿¡¢Óʼþ֪ͨµÈ.
¸ü¶àITrackerÐÅÏ¢
 Scarab 
ScarabÊÇÒ»¸ö·Ç³£Áé»îµÄissue¹ÜÀíϵͳ.Ëü¾ßÓÐÒÔÏÂÌصã:
1.ÆäËüϵͳһÑù¶¼¾ßÓеÄÌصã:Êý¾ÝµÄÊäÈë,²éѯ,±¨¸æ,֪ͨµ½Ïà¹ØµÄµ±ÊÂÈË,×¢Ê͵ÄЭ×÷»ýÀÛ,ÒÀÀµ×·×ÙµÈ.
2.Scarabͨ¹ýÒ»×é¹ÜÀí ......

½« Flex ¼¯³Éµ½ Java EE Ó¦ÓóÌÐòµÄ×î¼Ñʵ¼ù


Ô­ÌûµØÖ·£ºhttp://www.ibm.com/developerworks/cn/java/j-lo-jeeflex/?S_TACT=105AGX52&S_CMP=tec-csdn
´«Í³µÄ Java EE Ó¦ÓóÌÐòͨ³£Ê¹ÓÃijÖÖ MVC ¿ò¼Ü£¨ÀýÈ磬Struts£©×÷Ϊǰ¶ËÓû§½çÃ棬Ëæ×Å Flex µÄÐËÆ𣬻ùÓÚ RIA µÄ¿Í»§¶ËÄܹ»¸øÓû§´øÀ´¸ü¿áµÄ½çÃ棬¸ü¶ÌµÄÏìӦʱ¼ä£¬ÒÔ¼°¸ü½Ó½üÓÚ×ÀÃæÓ¦ÓóÌÐòµÄÌåÑé¡£±¾ÎĽ«½²Ê ......

JAVA ÄÚ²¿ÀàµÄ¼òµ¥×ܽá

¶¨ÒåÔÚÒ»¸öÀàÄÚ²¿µÄÀà½ÐÄÚ²¿À࣬°üº¬ÄÚ²¿ÀàµÄÀà³ÆΪÍⲿÀà¡£ÄÚ²¿Àà¿ÉÒÔÉùÃ÷public¡¢protected¡¢privateµÈ·ÃÎÊÏÞÖÆ£¬¿ÉÒÔÉùÃ÷ΪabstractµÄ¹©ÆäËûÄÚ²¿Àà»òÍⲿÀà¼Ì³ÐÓëÀ©Õ¹£¬»òÕßÉùÃ÷Ϊstatic¡¢finalµÄ£¬Ò²¿ÉÒÔʵÏÖÌض¨µÄ½Ó¿Ú¡£staticµÄÄÚ²¿ÀàÐÐΪÉÏÏóÒ»¸ö¶ÀÁ¢µÄÀ࣬·ÇstaticÔÚÐÐΪÉÏÀàËÆÀàµÄÊôÐÔ»ò·½·¨ÇÒ½ûÖ¹ÉùÃ÷staticµÄ·½· ......

java¿ª·¢ÈËÔ±¾­Ñé×ܽá

java¿ª·¢ÈËÔ±¾­Ñé×ܽá-Î人±±´óÇàÄñ
¡¡¡¡·Á¢Ïî
¡¡¡¡Ò»¡¢ÐèÇóµÄÊÕ¼¯£¬UCµÄ±àдËäÈ»²»ÊÇ¿ª·¢ÈËÔ±µÄ¹¤×÷£¬µ«×îÖÕÐèÒª¿ª·¢ÈËÔ±ÔÚ²úÆ·ÖÐʵÏÖ¡£ËùÒÔ¿ª·¢²»ºÏÀíµÄÉè¼ÆÖÁÉÙÀË·ÑÁËÄãµÄʱ¼ä£¬¿ª·¢¼¼ÊõÎÞ·¨ÊµÏÖµÄÉè¼Æ´øÀ´×î´óµÄÍ´¿à£ºÊ§°Ü¡£ËùÒÔ£¬¿ª·¢ÈËÔ±ÒªÖØÊÓÐèÇóÒÔ¼°UCµÄÆÀÉó£¬Ìá³ö×Ô¼ºÄܹ»Ïëµ½µÄËùÓÐÒìÒé¡£
¡¡¡¡¶þ¡¢Ò»¶ ......

JavaÖн«Êý×é¸÷ÔªËØ×÷ΪÊý¾ÝÏî²åÈëµ½Êý¾Ý¿âÖÐ

private PreparedStatement pstmt;
String sql="INSERT INTO TABLE(id,Ãû³Æ,Óû§id,Stbid,MAC,Óû§×´Ì¬,×Ü´ÎÊý,IpµØÖ·,×ÊÁϸüÐÂʱ¼ä) " +
           "VALUES(?,?,?,?,?,?,?,?,?)";
 pstmt=connection.prepareStatement(sql);
 pstmt.setString(1,array[0]);
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ