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

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

JAVAÖÐÓÃÓÚ´¦Àí×Ö·û´®µÄ“ÈýÐֵܔ
JAVAÖÐÓÃÓÚ´¦Àí×Ö·û´®³£ÓõÄÓÐÈý¸öÀࣺjava.lang.String¡¢java.lang.StringBuffer¡¢java.lang.StringBuilder£¬ÕâÈýÕߵĹ²Í¬Ö®´¦¶¼ÊÇfinalÀ࣬²»ÔÊÐí±»¼Ì³Ð£¬ÕâÖ÷ÒªÊÇ´ÓÐÔÄܺͰ²È«ÐÔÉÏ¿¼Âǵģ¬ÒòΪÕ⼸¸öÀ඼ÊǾ­³£±»Ê¹ÓÃ×ŵģ¬ÇÒ¿¼Âǵ½·ÀÖ¹ÆäÖеIJÎÊý±»ÐÞ¸ÄÓ°Ïìµ½ÆäËüµÄÓ¦Óá£StringBufferÓëStringBuilderÁ½¸ö»ù±¾Éϲ¶à£¬Ö»ÊÇStringBufferÊÇḬ̈߳²È«£¬¿ÉÒÔ²»ÐèÒª¶îÍâµÄͬ²½ÓÃÓÚ¶àÏß³ÌÖУ»StringBuilderÊÇ·Çͬ²½£¬ÔËÐÐÓÚ¶àÏß³ÌÖоÍÐèҪʹÓÃ×ŵ¥¶Àͬ²½´¦Àí£¬µ«ÊÇËٶȾͱÈStringBuffer¿ì¶àÁË£»¶þÕßÖ®¼äµÄ¹²Í¬µã¶¼¿ÉÒÔͨ¹ýappend¡¢insert½øÐÐ×Ö·û´®µÄ²Ù×÷¡£
StringʵÏÖÁËÈý¸ö½Ó¿Ú£ºSerializable¡¢Comparable<String>¡¢CharSequence£¬¶øStringBuffer¼°StringBuilderֻʵÏÖÁËÁ½¸ö½Ó¿ÚSerializable¡¢CharSequence£¬Ïà±ÈÖ®ÏÂStringµÄʵÀý¿ÉÒÔͨ¹ýcompareTo·½·¨½øÐбȽϣ¬¶øÆäËüÁ½¸ö¾Í²»¿ÉÒÔ¡£
ÒÔÏÂÊÇJDKÖжÔString¡¢StringBuffer¡¢StringBuilderµÄÏêϸ½éÉÜ£º
String£º
String Àà´ú±í×Ö·û´®¡£Java ³ÌÐòÖеÄËùÓÐ×Ö·û´®×ÖÃæÖµ£¨Èç "abc" £©¶¼×÷Ϊ´ËÀàµÄʵÀýʵÏÖ¡£
×Ö·û´®Êdz£Á¿£»ËüÃǵÄÖµÔÚ´´½¨Ö®ºó²»Äܸü¸Ä¡£×Ö·û´®»º³åÇøÖ§³Ö¿É±äµÄ×Ö·û´®¡£ÒòΪ String ¶ÔÏóÊDz»¿É±äµÄ£¬ËùÒÔ¿ÉÒÔ¹²Ïí¡£ÀýÈ磺
     String str = "abc";
 µÈЧÓÚ£º
     char data[] = {'a', 'b', 'c'};
     String str = new String(data);
 ÏÂÃæ¸ø³öÁËһЩÈçºÎʹÓÃ×Ö·û´®µÄ¸ü¶àʾÀý£º
     System.out.println("abc");
     String cde = "cde";
     System.out.println("abc" + cde);
     String c = "abc".substring(2,3);
     String d = cde.substring(1, 2);
 String Àà°üÀ¨µÄ·½·¨¿ÉÓÃÓÚ¼ì²éÐòÁеĵ¥¸ö×Ö·û¡¢±È½Ï×Ö·û´®¡¢ËÑË÷×Ö·û´®¡¢ÌáÈ¡×Ó×Ö·û´®¡¢´´½¨×Ö·û´®¸±±¾²¢½«ËùÓÐ×Ö·ûÈ«²¿×ª»»Îª´óд»òСд¡£´óСдӳÉä»ùÓÚ Character ÀàÖ¸¶¨µÄ Unicode ±ê×¼°æ¡£
Java ÓïÑÔÌṩ¶Ô×Ö·û´®´®Áª·ûºÅ£¨"+"£©ÒÔ¼°½«ÆäËû¶ÔÏóת»»Îª×Ö·û´®µÄÌØÊâÖ§³Ö¡£×Ö·û´®´®ÁªÊÇͨ¹ý StringBuilder£¨»ò StringBuffer£©À༰Æä append ·½·¨ÊµÏֵġ£×Ö·û´®×ª»»ÊÇͨ¹ý toString ·½·¨ÊµÏֵģ¬¸Ã·½·¨ÓÉ Object ÀඨÒ壬²¢¿É±» Java ÖеÄËùÓÐÀà¼Ì³Ð¡£Óй


Ïà¹ØÎĵµ£º

javaÐÂÎÅץȡ³ÌÐò´úÂë

/*ÎÒ×öÁ˸ö³ÌÐò°ÑÐÂÀËÉϵÄÌìÆøÐÂÎÅ×¥¹ýÀ´´æµ½±¾µØ£¬¿¼ÂÇ·ÃÎÊËÙ¶ÈÎÊÌ⣬ÐÂÎÅÖеÄͼƬҲҪ±£´æµ½±¾µØ¡£
³ÌÐòÈçÏÂ
*/
package vnet.com.weather1;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java ......

java »ñÈ¡ÍøÒ³ÄÚÈÝ

package test;



import java.io.BufferedReader;

import java.io.IOException;

import java.io.InputStream;

import java.io.InputStreamReader;

import java.net.Authenticator;

import java.net.HttpURLConnection;

import java.net.PasswordAuthenticat ......

[ת]ÔÙÂÛJavaδÀ´Ö®Â·

2006ÄêÎÒÔø¾­Ð´¹ýһƪÌÖÂÛJavaδÀ´µÄÎÄÕ£¬ÔÚÄÇƪÎÄÕÂÖÐÎÒÌÖÂÛÁË¿ªÔ´¡¢JavaÔÚÏû·Ñµç×ÓÉ豸ÖеÄʹÓã¬ÏÖÔÚÔÚËùÓÐÀàÐ͵ÄÒƶ¯É豸ÉÏJavaµÄÓ¦ÓÃÕýÔÚÖð²½ÉÏÉý¡£¶ÔSun±»ÊÕ¹ºÒ»Ê£¬ÒÔ¼°JavaÓëOracle²úÆ·¼¯³ÉÎÒûʲôºÃÔ¤²âµÄ£¬Ò²Ã»Ê²Ã´ºÃµÄ½¨Ò飬ÎÒÖ»µ£ÐÄJavaµÄδÀ´»á×ßÏòºÎ·½?ÔÚÕâƪÎÄÕÂÖÐÎÒÖØÐÂÉóÊÓÁËOracleÊÕ¹ºSunºóJavaµÄδÀ´Ö ......

JavaÖеÄÖµ´«µÝºÍÒýÓô«µÝ

ÔÚjavaÖÐʵÖÊÖ»´æÔÚÒ»ÖÖ´«µÝ·½Ê½£º¼´Öµ´«µÝ¡£ ¶øÒýÓô«µÝÊǶÔC/C++¶øÑԵġ£½áÂÛ£º
¡¡¡¡¶ÔÓÚ»ù±¾ÀàÐÍ£¬ÔÚ·½·¨ÌåÄÚ¶Ô·½·¨²ÎÊý½øÐÐÖØи³Öµ£¬²¢²»»á¸Ä±äÔ­ÓбäÁ¿µÄÖµ¡£
¡¡¡¡¶ÔÓÚÒýÓÃÀàÐÍ£¬ÔÚ·½·¨ÌåÄÚ¶Ô·½·¨²ÎÊý½øÐÐÖØи³ÓèÒýÓ㬲¢²»»á¸Ä±äÔ­ÓбäÁ¿Ëù³ÖÓеÄÒýÓá£
¡¡¡¡·½·¨ÌåÄÚ¶Ô²ÎÊý½øÐÐÔËË㣬²»Ó°ÏìÔ­ÓбäÁ¿µÄÖµ¡£
¡¡¡¡ ......

Ϸ˵java web¿ª·¢ÖеÄlistenerºÍfilter

ÎÄÕÂת×Ô£ºhttp://javastudy.blog.51cto.com/183528/78723
jsp¿ª·¢ÖеĠ¼àÌýÆ÷ºÍ¹ýÂËÆ÷£¬ÕâÁ½¸ö¶«Î÷Ҫ˵ÆðÀ´£¬ºÜ´ó£¬ºÜ·±¡£½ñÌìÎÒÏëÓÃÒ»¸öÏÖʵµÄÀý×Ó£¬À´ËµÃ÷ÕâÁ½¸ö¶«¶«µÄ×÷Óá£
°¸ÀýÃèÊö
        ¼ÙÉèÄãƽʱÉú»îÔÚ±±¾©£¬ÓÐÌìÄãÈ¥Ò»¸öºÜ±ßÔ¶ºÜƶÇîµÄɽ´åÌåÑéÉú»î£¬µ½ÁËÄǸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ