Java°´×Ö½Ú³¤¶È½ØÈ¡×Ö·û´®
±à³Ì£º±àдһ¸ö½ØÈ¡×Ö·û´®µÄº¯Êý£¬ÊäÈëΪһ¸ö×Ö·û´®ºÍ×Ö½ÚÊý£¬Êä³öΪ°´×Ö½Ú½ØÈ¡µÄ×Ö·û´®¡£µ«ÊÇÒª±£Ö¤ºº×Ö²»±»½Ø°ë¸ö£¬Èç"ÎÒABC"4£¬Ó¦¸Ã½ØΪ"ÎÒAB"£¬ÊäÈë"ÎÒABCººDEF"£¬6£¬Ó¦¸ÃÊä³öΪ"ÎÒABC"¶ø²»ÊÇ"ÎÒABC+ººµÄ°ë¸ö"¡£
¡¡¡¡public static String substring(String str, int toCount,String more)
¡¡¡¡{
¡¡¡¡int reInt = 0;
¡¡¡¡String reStr = "";
¡¡¡¡if (str == null)
¡¡¡¡return "";
¡¡¡¡char[] tempChar = str.toCharArray();
¡¡¡¡for (int kk = 0; (kk < tempChar.length && toCount > reInt); kk++) {
¡¡¡¡String s1 = str.valueOf(tempChar[kk]);
¡¡¡¡byte[] b = s1.getBytes();
¡¡¡¡reInt += b.length;
¡¡¡¡reStr += tempChar[kk];
¡¡¡¡}
¡¡¡¡if (toCount == reInt || (toCount == reInt - 1))
¡¡¡¡reStr += more;
¡¡¡¡return reStr;
¡¡¡¡}
¡¡¡¡WebÓ¦ÓóÌÐòÔÚä¯ÀÀÆ÷ÖÐÏÔʾ×Ö·û´®Ê±£¬ÓÉÓÚÏÔʾ³¤¶ÈµÄÏÞÖÆ£¬³£³£ÐèÒª½«×Ö·û´®½ØÈ¡ºóÔÙ½øÐÐÏÔʾ¡£µ«Ä¿Ç°ºÜ¶àÁ÷ÐеÄÓïÑÔ£¬ÈçC#¡¢JavaÄÚ²¿²ÉÓõĶ¼ÊÇ Unicode 16£¨UCS2£©±àÂ룬ÔÚÕâÖÖ±àÂëÖÐËùÓеÄ×Ö·û¶¼ÊÇÁ½¸ö×Ö·û£¬Òò´Ë£¬Èç¹ûÒª½ØÈ¡µÄ×Ö·û´®ÊÇÖС¢Ó¢ÎÄ¡¢Êý×Ö»ìºÏµÄ£¬¾Í»á²úÉúÎÊÌ⣬ÈçÏÂÃæµÄ×Ö·û´®£º
¡¡¡¡String s = "a¼ÓbµÈÓÚc£¬Èç¹ûaµÈ1¡¢bµÈÓÚ2£¬ÄÇôcµÈ3";
¡¡¡¡ÉÏÃæµÄ×Ö·û´®¼ÈÓкº×Ö£¬ÓÖÓÐÓ¢ÎÄ×Ö·ûºÍÊý×Ö¡£Èç¹ûÒª½ØÈ¡Ç°6¸ö×Ö½ÚµÄ×Ö·û£¬Ó¦¸ÃÊÇ”a¼ÓbµÈ"£¬µ«Èç¹ûÓÃsubstring·½·¨½ØÈ¡Ç°6¸ö×Ö·û¾Í³ÉÁË"a ¼ÓbµÈÓÚc"¡£²úÉúÕâ¸öÎÊÌâµÄÔÒòÊǽ«substring·½·¨½«Ë«×ֽڵĺº×Öµ±³ÉÒ»¸ö×Ö½ÚµÄ×Ö·û£¨UCS2×Ö·û£©´¦ÀíÁË¡£Òª½â¾öÕâ¸öÎÊÌâµÄ·½·¨ÊÇÊ×Ïȵõ½¸Ã×Ö·û´®µÄUCS2±àÂëµÄ×Ö½ÚÊý×飬ÈçÏÂÃæµÄ´úÂëÈçÏ£º
¡¡¡¡byte[] bytes = s.getBytes("Unicode");
¡¡¡¡ÓÉÓÚÉÏÃæÉú³ÉµÄ×Ö½ÚÊý×éÖÐÇ°Á½¸ö×Ö½ÚÊDZê־룬bytes[0] = -2£¬bytes[1] = -1£¬Òò´Ë£¬Òª´ÓµÚÈý¸ö×Ö½Ú¿ªÊ¼É¨Ã裬¶ÔÓÚÒ»¸öÓ¢ÎÄ»òÊý×Ö×Ö·û£¬UCS2±àÂëµÄµÚ¶þ¸ö×Ö½ÚÊÇÏàÓ¦µÄASCII£¬µÚÒ»¸ö×Ö½ÚÊÇ0£¬ÈçaµÄUCS2±àÂëÊÇ0 97£¬¶øºº×ÖÁ½¸ö×Ö½Ú¶¼²»Îª0£
Ïà¹ØÎĵµ£º
Ò»£º×¼±¸ www.savarese.org download
1. rocksaw-1.0.0-src.tar.gz
2. vserv-tcpip-0.9.2-src.tar.gz
¶þ£º±àÒëÔ´ÎļþµÃµ½jar°ü ʹÓÃAnt
1. build vserv-tcpip-0.9.2-src
ÔÚvserv-tcpip-0.9.2Ŀ¼ÏÂÃ潨һ¸ötestsĿ¼£¬È»ºóÔÚcmd´°¿ÚϽøÈë ......
Java ¶¨ÒåµÄλÔËË㣨bitwise operators £©Ö±½Ó¶ÔÕûÊýÀàÐ͵Äλ½øÐвÙ×÷£¬ÕâЩÕûÊýÀàÐÍ°üÀ¨long£¬int£¬short£¬char£¬and byte ¡£±í4-2 ÁгöÁËλÔËË㣺
±í4.2 λÔËËã·û¼°Æä½á¹û
ÔËËã·û ½á¹û
~ °´Î»·Ç£¨NOT£©£¨Ò»ÔªÔËË㣩
& °´Î»Ó루AND£©
| °´Î»»ò£¨OR£©
^ °´Î»Òì»ò£¨XOR£©
>> ÓÒÒÆ
>>> ÓÒÒ ......
ÒøÐбÊÊÔÌâ¼°´ð°¸:java±ÊÊÔÌâ¼°´ð°¸
1¡¢×÷ÓÃÓòpublic,private,protected,ÒÔ¼°²»Ð´Ê±µÄÇø±ð
´ð£º
Çø±ðÈçÏ£º
×÷ÓÃÓò µ±Ç°Àà ͬһpackage ×ÓËïÀà &n ......
×÷ÕߣºÏÉÈËÕƹ¤×÷ÊÒ³ö´¦£ºKissJava.comÔðÈα༣ºÍõÓñº
Èç¹ûÄãÔø¾ÓùýPerl»òÈκÎÆäËûÄÚ½¨ÕýÔò±í´ïʽ֧³ÖµÄÓïÑÔ£¬ÄãÒ»¶¨ÖªµÀÓÃÕýÔò±í´ïʽ´¦ÀíÎı¾ºÍÆ¥ÅäģʽÊǶàô¼òµ¥¡£Èç¹ûÄã²»ÊìϤÕâ¸öÊõÓÄÇô“ÕýÔò±í´ïʽ”£¨Regular Expression£©¾ÍÊÇÒ»¸ö×Ö·û¹¹³ÉµÄ´®£¬Ëü¶¨ÒåÁËÒ»¸öÓÃÀ´ËÑË÷Æ¥Åä×Ö·û´® ......
1¡¢×÷ÓÃÓòpublic,private,protected,ÒÔ¼°²»Ð´Ê±µÄÇø±ð
´ð£º
Çø±ðÈçÏ£º
×÷ÓÃÓò µ±Ç°Àà ͬһpackage ×ÓËïÀà ÆäËûpackage
p ......