JAVAºº×Ö×Ö·û´®°´Æ´ÒôÅÅÐò
Ä¿±ê£ºÊµÏÖÒ»¸öºº×Ö×Ö·û´®°´ººÓïÆ´Òô×Öµä˳ÐòÅÅÐò¡£
ÔÀí£ºÔÚwindows»·¾³µÄgbk×Ö·û¼¯Àºº×ÖÊÇ°´ººÓïÆ´Òô×Öµä˳Ðò±àÂëµÄ£¬Èç“´¡”ÊÇ B4A1£¬“´¢”ÊÇB4A2¡£ÕâÀïÓиöÎÊÌâ¾ÍÏñÉÏÃæµÄ´¢ºÍ´¡ÕâÑùµÄͬÒô×ÖÖ»ÄÜ×ñÕÕ±àÂëµÄ˳ÐòÁË£¬ÁíÍâ¶àÒô×ÖÒ²µÃ×ñÕÕ±àÂë˳Ðò¡£Éè¼Æ˼·ÊÇÏȲð·Öºº×Ö×Ö·û´®Îª×Ö·ûÊý×飬»ñµÃÿ¸öºº×Ö×Ö·ûµÄ16½øÖÆ×Ö·û´®±íʾ£¬È»ºó±È½Ï¸Ã×Ö·û´®µÄ×Öµä˳Ðò´óС£¬ÅÅÐò¡£ÐèҪ˵Ã÷µÄÊÇ£¬»ñµÃºº×Ö×Ö·ûµÄ×Ö½ÚÊý×飬ת»»³Éint±È½ÏÒ²¿É£¬ÊµÏÖ´ÓÂÔ¡£ÏÂÃæÊÇʵÏֵĴúÂë:
import java.io.UnsupportedEncodingException;
public class HanZiSort {
public static void main(String[] args) throws UnsupportedEncodingException {
String test = "ÎÒ°®±±¾©Ìì°²ÃÅ";
System.out.println(sort(test, "gb2312"));
}
public static String sort(String s, String charset) {
char[] c = s.toCharArray();
for (int i = 0; i < c.length - 1; i++) {
for (int j = i + 1; j < c.length; j++) {
if (getHexString(new String(new char[] { c[i] }), charset)
.compareTo(
getHexString(new String(new char[] { c[j] }),
charset)) > 0) {
char temp = c[i];
c[i] = c[j];
c[j] = temp;
}
}
}
return new String(c);
}
public static String getHexString(String s, String charset) {
byte[] b = null;
StringBuffer sb = new StringBuffer();
try {
b = s.getBytes(charset);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
for (int i = 0; i < b.length; i++) {
sb.append(Integer.toHexString(b[i] & 0xFF));
}
return sb.toString();
}
}
´òÓ¡µÄ½á¹ûΪ£º°®°²±±¾©ÃÅÌìÎÒ
Ïà¹ØÎĵµ£º
java´óÖÂÓÐ3ÖÖÓï¾ä£ºË³ÐòÓï¾ä¡¢Ìõ¼þÓï¾ä¡¢Ñ»·Óï¾ä
Ìõ¼þÓï¾ä£º
µÚÒ»ÖÖ£ºif Ìõ¼þ
Óï¾ä
µÚ¶þÖÖ£ºif Ìõ¼þ
&nbs ......
½«FlexÓëSpring¼¯³Éºó£¨BlazeDS ÓëSpring¼¯³ÉÖ¸ÄÏ £©£¬µÚÒ»¸öÃæÁÙµÄÎÊÌâ¾ÍÊÇ£º¶ÔÓÚJava¶Ë·µ»ØµÄ¸÷ÖÖJavaÀàÐ͵ĶÔÏó£¬FlexÖÐÄÜ·ñÓÐÏàÓ¦µÄÊý¾ÝÀàÐÍÀ´Ó³Éä¡£
´¦Àí£¬ÓÈÆäÊÇList¡¢Set¡¢Map¼°POJO¶ÔÏóÖµ¡£
ÔÚ BlazeDS ÓëSpring¼¯³ÉÖ¸ÄÏ Àý×ӵĻù´¡ÉÏ£¬µ÷ÕûÏà¹ØµÄ²âÊÔ´úÂëÈçÏ£º
1¡¢Java¶Ë
1.1¡¢com.yeeach.HelloWorldService ......
È«¾Ö±äÁ¿£ºÒ²½Ð³ÉÔ±±äÁ¿£¬ÊÇÖ¸ÔÚÀàÖж¨ÒåµÄ±äÁ¿£»ËüÔÚÕû¸öÀàÖж¼ÓÐЧ
È«¾Ö±äÁ¿ÓÖ¿É·ÖΪ£ºÀà±äÁ¿ºÍʵÀý±äÁ¿
1.Àà±äÁ¿£ºÓֽо²Ì¬±äÁ¿ ......
instanceofÊÇJavaµÄÒ»¸ö¶þÔª²Ù×÷·û£¬ºÍ==£¬>£¬<ÊÇͬһÀණ¶«¡£ÓÉÓÚËüÊÇÓÉ×Öĸ×é³ÉµÄ£¬ËùÒÔÒ²ÊÇJavaµÄ±£Áô¹Ø¼ü×Ö¡£ËüµÄ×÷ÓÃÊDzâÊÔËü×ó±ßµÄ¶ÔÏóÊÇ·ñÊÇËüÓұߵÄÀàµÄʵÀý£¬·µ»ØbooleanÀàÐ͵ÄÊý¾Ý¡£¾Ù¸öÀý×Ó£º
¡¡¡¡String s = "I AM an Object!";
¡¡¡¡boolean isObject = s instanceof Object;
¡¡¡¡ÎÒÃÇÉùÃ÷ÁËÒ»¸öStrin ......
ÍøÂçµÄ¸ÅÄî:Ï໥Á¬½Ó,¶ÀÁ¢×ÔÖ÷
ÍøÂçÓë·Ö²¼Ê½¼¯ÈºÏµÍ³µÄÇø±ð£ºÃ¿¸ö½Úµã¶¼ÊÇһ̨¼ÆËã»ú£¬¶ø²»ÊǸ÷ÖÖ¼ÆËã»úÄÚ²¿µÄ¹¦ÄÜÉ豸¡£
Ip:¾ßÓÐÈ«ÇòΨһÐÔ£¬Ïà¶ÔÓÚinternet£¬IPΪÂß¼µØÖ·£¬TCP/IPÍøÂçÖеÄÿ̨¼ÆËã»ú¶¼ÓÐΨһµÄµØÖ·--IPµØÖ·. Ψһ±êʾһ̨Ö÷»ú
ÔÚJavaÖÐ,ÓÐÒ»¸öÓÃÀ´´æ´¢internetµØÖ·µÄÀà½ÐInetAddress.
Àý:»ñÈ¡±¾» ......