JAVA¶ÁÊé±Ê¼Ç£¨Èý£©
StringÀàûÓÐÌṩÐÞ¸ÄÒ»¸öÒÑ´æÔÚµÄ×Ö·û´®ÖеÄijһ¸ö×Ö·ûµÄ·½·¨£¬ÀýÈ磺String greeting="Hello";Èç¹ûÏë°Ñgreeting±ä³É"Help!"£¬²»ÄÜÖ±½Ó°ÑgreetingµÄ×îºóһλ±ä³É'p'ºÍ'!'£¬¶øÊDZ£ÁôÐèÒªµÄ×Ö·û´®£¬½«Ìæ»»µÄ×Ö·û´®Í¨¹ý"+"Á¬½ÓÔÚÒ»Æð¡£
greeting=greeting.substring(0,3)+"p!";
StringÀàÊDz»¿É¸Ä±äµÄ£¬¾ÍÏñÊý×Ö3¾ÍÊÇ3£¬×Ö·û´®"Hello"×ÜÊÇ°üº¬H,e,l,l,oµÈ×Ö·ûµÄÓÐÐò¼¯ºÏ£¬ÕâЩ×Ö·ûÊDz»ÄܸıäµÄ£¬Ö»ÄÜͨ¹ý¸Ä±ä±äÁ¿greetingµÄÄÚÈÝ£¬Ê¹ËüÖ¸ÏòÁíÒ»¸ö²»Í¬µÄ×Ö·û´®¡£
ÕâÑùÊÇ·ñ»áµ¼ÖÂЧÂʽµµÍ£¿Ö»¸Ä±äijЩ×Ö·û¿´ÆðÀ´±È´´½¨Ò»¸öеÄ×Ö·û´®¼òµ¥£¬ÊÂʵÉÏ£¬ÖØÐÂÉú³É×Ö·û´®£¬²¢ÇÒ°Ñ"Hel"ºÍ"p!"Æ´½ÓÆðÀ´£¬²¢²»»áÓ°ÏìЧÂÊ¡£ÒòΪStringÓÐÒ»¸ö¾Þ´óµÄÓŵ㣺±àÒëÆ÷½«×Ö·û´®ÉèÖÃΪ¹²ÏíµÄ¡£¿ÉÒÔÏëÏóµ½£¬Ðí¶à×Ö·û´®´æ·ÅÔÚÒ»¸ö¹«¹²µÄ³ØÖС£String±äÁ¿Ö¸Ïò³ØÖеÄijһ¸öλÖá£Èç¹û¿½±´Ò»¸öString±äÁ¿£¬ÄÇôÔÀ´µÄ±äÁ¿ºÍеıäÁ¿¶¼Ö¸Ïòͬһ¸ö×Ö·û´®¡£
ÕâÀïËù˵µÄ¹²Ïíͬһ¸ö×Ö·û´®£¬ÊǶÔ×Ö·û´®³£Á¿À´ËµµÄ£¬¶ÔÓÚsubstring»òÕß+À´Ëµ£¬²¢²»ÊÊÓá£
String str="Hello";
String str1="World";
System.out.println(str+str1=="HelloWorld"); //false
System.out.println(str.substring(0,3)=="Hel"); //false
System.out.println(str=="Hello"); //true
Ïà¹ØÎĵµ£º
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëƽ̨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐÑ°ÕÒÌض¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤×÷¡£ÓÉÓÚËüÊÇ»ùÓÚÐÅÏ¢²ã´ÎµÄ£¬Òò¶øDO ......
ÿ¸öJava³õѧÕ߶¼Ó¦¸ÃÃ÷°×µÄÎÊÌâ
¶ÔÓÚÕâ¸öϵÁÐÀïµÄÎÊÌ⣬ÿ¸öѧJavaµÄÈ˶¼Ó¦¸Ã¸ã¶®¡£µ±È»£¬Èç¹ûÖ»ÊÇѧJavaÍæÍæ¾ÍÎÞËùνÁË¡£Èç¹ûÄãÈÏΪ×Ô¼ºÒѾ³¬Ô½³õѧÕßÁË£¬È´²»ºÜ¶®ÕâЩÎÊÌ⣬Ç뽫Äã×Ô¼ºÖعé³õѧÕßÐÐÁС£ÄÚÈݾùÀ´×ÔÓÚCSDNµÄ¾µäÀÏÌù¡£
¡¡¡¡ÎÊÌâÒ»£ºÎÒÉùÃ÷ÁËʲô£¡
String s = "Hello world!";
¡¡¡¡Ðí¶àÈ˶¼×ö¹ýÕâÑùµÄ ......
Java Web¿ª·¢ÖУ¬ÓÐÐí¶à¹²Í¨µÄÎÊÌ⣬ÊÇ¿ª·¢ÈËÔ±ÔÚ¿ª·¢¹ý³ÌÖÐÒ»¶¨»áÓöµ½µÄ£¬ÐèÒª´¦ÀíµÄÎÊÌ⣺
1. ÂÒÂëÎÊÌâ
ΪºÎ»á³öÏÖÂÒÂëÎÊÌ⣿¼ÈÈ»ÓÐÂÒÂëÎÊÌ⣬¿Ï¶¨ÊÇÓÉÓÚ±àÂëÉèÖõIJ»Ò»Öµ¼Öµġ£ÔÚWeb¿ª·¢
¹ý³ÌÖУ¬Éæ¼°ÒÔÏÂһЩ±àÂëÉèÖ㬿ͻ§¶Ë²ÎÊýµÄ±àÂëÉèÖã¬Web·þÎñÆ÷µÄ±àÂëÉèÖ㬷þÎñÆ÷¶ËÓ¦ÓóÌÐòµÄ±àÂëÉèÖã¬Êý¾Ý¿â ......
JDBC Name: jTDS
URL: http://jtds.sourceforge.net/
Version: 0.5.1
Download URL: http://sourceforge.net/project/showfiles.php?group_id=33291
Óï·¨:
Class.forName("net.sourceforge.jtds.jdbc.Driver
");
Connection con =
DriverManager.getConnection("jdbc:jtds:sqlserver://host:port/datab ......
JavaµÄÄÚ´æÄ£ÐÍJMM£¨Java Memory Model£©JMMÖ÷ÒªÊÇΪÁ˹涨ÁËÏ̺߳ÍÄÚ´æÖ®¼äµÄһЩ¹Øϵ¡£¸ù¾ÝJMMµÄÉè¼Æ£¬ÏµÍ³´æÔÚÒ»¸öÖ÷ÄÚ´æ(Main Memory)£¬JavaÖÐËùÓÐʵÀý±äÁ¿¶¼´¢´æÔÚÖ÷´æÖУ¬¶ÔÓÚËùÓÐÏ̶߳¼Êǹ²ÏíµÄ¡£Ã¿ÌõÏ̶߳¼ÓÐ×Ô¼ºµÄ¹¤×÷ÄÚ´æ(Working Memory)£¬¹¤×÷ÄÚ´æÓÉ»º´æºÍ¶ÑÕ»Á½²¿·Ö×é³É£¬»º´æÖб£´æµÄÊÇÖ÷´æÖбäÁ¿µÄ¿½±´£¬»º´ ......