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 Öе
Ïà¹ØÎĵµ£º
XSDÎļþ £¨XML Schema ÓïÑÔÒ²³Æ×÷ XML Schema ¶¨Ò壨XML Schema Definition£¬XSD£©¡£ ¾ßÌåʹÓ÷½·¨ºÍ¶¨ÒåÇë²Î¿´£º
http://www.w3school.com.cn/schema/index.asp
java×Ôjdk1.5ÒÔÉÏÐÂÔöÁËSchemaFactoryÀà ¿ÉÒÔʵÏÖ¶ÔXSDÑéÖ¤µÄÖ§³Ö£¬Ê¹ÓÃÆðÀ´Ò²ºÜ·½±ã¡£
ÒÔÏ´úÂë¿ÉÓÃÔÚJDK1.5+ ÑéÖ¤xml
public class SimpleErrorHandler i ......
Ãô½Ý¿ª·¢µÄÀíÄîÒѾÁ÷ÐÐÁ˺ܳ¤µÄʱ¼ä£¬ÔÚÃô½Ý¿ª·¢ÖеĿª·¢µü´ú½×¶ÎÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÎå¸ö²½Ö裬À´ÓÐЧµÄÌá¸ßÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿¡£
JavaÏîÄ¿¿ª·¢¹ý³ÌÖУ¬ÓÉÓÚ¿ª·¢ÈËÔ±µÄ¾Ñé¡¢Java´úÂë±àдϰ¹ß£¬ÒÔ¼°È±·¦Í³Ò»µÄ±ê×¼ºÍ¹ÜÀíÁ÷³Ì£¬ÍùÍùµ¼ÖÂÕû¸öÏîÄ¿µÄ´úÂëÖÊÁ¿½Ï²î£¬ÄÑÓÚά »¤£¬ÐèÒª½Ï´óµÄ²âÊÔͶÈëºÍÖÜÆÚµÈÎÊÌâ¡£ÕâЩÎÊÌâÔÚÒ»¸öÏ ......
Java ÊÇÒÔÀࣨclass£©µÄÐÎʽÀ´×éÖ¯³ÌÐò£¬²¢ÇÒ»¹Ó²ÐԹ涨£¬ËùÓÐÀàµÄµÄ¸ù½Úµã¶¼ÊÇObjectÀ࣬ÆäÓàµÄ¶¼ÊÇÆä×ÓÀà¡£
Java½öÖ§³Öµ¥¼Ì³Ð£¬¼´Ò»¸öÀàÖ»ÄÜÓÐÒ»¸ö¸¸Àà¡£
Java²»µ¥ÊÇÒ»¸öÃæÏò¶ÔÏóµÄ±à³ÌÓïÑÔ£¬ ³ýÁËÖ§³Ö¶ÔÏóÊý¾ÝÀàÐÍÍ⣬»¹Ö§³ÖһЩ»ù´¡Êý¾ÝÀàÐÍ£¬ÈçÕûÐÍ¡¢ÊµÐÍ¡¢×Ö·ûÐͺͲ¼¶ûÀàÐ͵ȡ£
JavaÓïÑÔµÄÓ¦ÓóÌÐò±à³ ......
ÌáÆðJavaÄÚ²¿ÀࣨInner Class£©¿ÉÄܺܶàÈ˲»Ì«ÊìϤ£¬Êµ¼ÊÉÏÀàËƵĸÅÄîÔÚC++ÀïÒ²ÓУ¬ÄǾÍÊÇǶÌ×ÀࣨNested Class£©£¬¹ØÓÚÕâÁ½ÕßµÄÇø±ðÓëÁªÏµ£¬ÔÚÏÂÎÄÖлáÓжԱȡ£ÄÚ²¿Àà´Ó±íÃæÉÏ¿´£¬¾ÍÊÇÔÚÀàÖÐÓÖ¶¨ÒåÁËÒ»¸öÀࣨÏÂÎĻῴµ½£¬ÄÚ²¿Àà¿ÉÒÔÔںܶàµØ·½¶¨Ò壩£¬¶øʵ¼ÊÉϲ¢Ã»ÓÐÄÇô¼òµ¥£¬Õ§¿´ÉÏÈ¥ÄÚ²¿ÀàËƺõÓÐЩ¶àÓ࣬ËüµÄÓô¦¶ÔÓÚ³õ ......