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

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];
                  &n


Ïà¹ØÎĵµ£º

һЩÄãÐèÒªÖªµÀµÄJava±à³Ì´úÂë¹æ·¶

Ê×ÏÈ£¬Ç¿ÁÒÍÆ¼öÄãÏȲο¼Sun¹Ù·½µÄJava´úÂë/±à³Ì¹æ·¶£º
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html

Äã¿ÉÒÔ´òÆÆÒÔÉϵÄÈÎÒ»¹æÔò£¬²»¹ýÒ»¶¨ÒªÓиöºÃÀíÓÉ£¬²¢ÇҼǼÏÂÀ´¡£
ÓÀÔ¶£¬ÓÀÔ¶£¬ÓÀÔ¶²»ÒªÔÚûÓмǼ¶ÑÕ»¸ú×ÙÐÅÏ¢£¨stack trace£©»òÊÇÖØÐÂÅ׳öÒì³£µÄÇé¿öϲ¶»ñÒì³££¬Ë׳Ɠ³ÔµôÒì³£&rd ......

JavaÐÂÊÖÈëÃźÜÖØÒªµÄ¼¸¸ö»ù±¾¸ÅÄî

 finalÀࣺΪ·ÀÖ¹ËûÈË´ÓÄãµÄÀàÉÏÅÉÉúÐÂÀ࣬´ËÀàÊDz»¿ÉÀ©Õ¹µÄ¡£
¡¡¡¡¶¯Ì¬µ÷ÓñȾ²Ì¬µ÷Óû¨·ÑµÄʱ¼äÒª³¤¡£
¡¡¡¡³éÏóÀࣺ¹æ¶¨Ò»¸ö»ò¶à¸ö³éÏó·½·¨µÄÀà±¾Éí±ØÐ붨ÒåΪabstract¡£
¡¡¡¡Àý£º public abstract string getDescripition
¡¡¡¡JavaÖеÄÿһ¸öÀà¶¼ÊÇ´ÓObjectÀàÀ©Õ¹¶øÀ´µÄ¡£
¡¡¡¡objectÀàÖеÄequalºÍtoString·½· ......

JavaÖеÄBigDecimalµÄʹÓÃ

BigDecimalÀà
Ë«¾«¶È¸¡µãÐͱäÁ¿double¿ÉÒÔ´¦Àí16λÓÐЧÊý¡£ÔÚʵ¼ÊÓ¦ÓÃÖУ¬ÐèÒª¶Ô¸ü´ó»òÕ߸üСµÄÊý½øÐÐÔËËãºÍ´¦Àí¡£JavaÔÚjava.math°üÖÐÌṩµÄAPIÀàBigDecimal£¬ÓÃÀ´¶Ô³¬¹ý16λÓÐЧλµÄÊý½øÐо«È·µÄÔËËã¡£±í5.7ÖÐÁгöÁËBigDecimalÀàµÄÖ÷Òª¹¹ÔìÆ÷ºÍ·½·¨¡£
±í5.7 BigDecimalÀàµÄÖ÷Òª¹¹ÔìÆ÷ºÍ·½·¨
¹¹ÔìÆ÷ÃèÊö
BigDecimal(in ......

java ×Ö·û´®±È½Ï

 ÊìϤC++µÄÈ˶ÔÓÚÁ½¸ö×Ö·û´®±È½ÏµÄ´úÂëÒ»¶¨ºÜÁ˽⣺
(string1==string2)
µ«ÔÚjavaÖУ¬Õâ¸ö´úÂ뼴ʹÔÚÁ½¸ö×Ö·û´®ÍêÈ«ÏàͬµÄÇé¿öÏÂÒ²»á·µ»Øfalse
JavaÖбØÐëʹÓÃstring1.equals(string2)À´½øÐÐÅжÏ
²¹³ä
Èç¹û£º
string s1=new String("Hello");
string s2=new String("Hello");
Ôò(s1==s2)=false
Èç¹û ......

JavaµÝ¹é¡¢·ÇµÝ¹éʵÏÖ¶þ²æÊ÷±éÀú

×î½üÕÒ¹¤×÷×ö±ÊÊÔÌâ·¢ÏÖºÜÖØÒª£¬¾Í×Ô¼ºÐ´ÁËÒ»µã£¬ºÍ´ó¼Ò·ÖÏí
import java.util.Stack;
import java.util.HashMap;
public class BinTree {
private char date;
private BinTree lchild;
private BinTree rchild;
public BinTree(char c) {
date = c;
}
// ÏÈÐò±éÀúµÝ¹é
public static void preOrder(Bi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ