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

JavaÖеÄÖÐÎÄÅÅÐò£¨¼ò¶Ì°æ£©

ÔÚJavaÖУ¬Èç¹ûÔÚ¶ÔÒ»¸öList»òÕßMapÅÅÐò£¬¿ÉÒÔ²ÉÓÃCollectionsµÄ¼¯ºÏÀàÖеÄsort·½·¨À´¶ÔList½øÐÐÅÅÐò¡£ÖÁÓÚmap£¬¿ÉÒÔʹÓÃTreeMap×Ô¶¯ÅÅÐò¡£
µ«ÒÔÉÏÅÅÐò½ö½öÊǶÔÓ¢ÎÄÅÅÐòʱ£¬²Å»áÕýÈ·£¬Èô¹ûÊý¾ÝÀïÃæ´æÔÚÖÐÎĺÍÓ¢ÎÄʱ£¬ÄÇôÅÅÐò¾ÍÂÒÁË¡£
ÏÖÔÚÎÒʵÏֵķ½·¨Êǰ´ÕÕÖÐÎĵį´ÒôÀ´ÅÅÐò¡££¨ÍøÉÏ£¬»¹Óа´±Ê»­ÅÅÐò£¬ÔÚÕâÀïÎҾͲ»Ò»Ò»ÊµÏÖÁË£©
ÈçÏÂÊǶÔMap£¬ÔÚн¨¶ÔÏóʱ£¬¸ømapʵÏÖcomparator½Ó¿Ú¡£
//ΪTreeMapÔö¼ÓÖÐÎÄÅÅÐò
userItems = new TreeMap(new Comparator(){
Collator collator = Collator.getInstance();
public int compare(Object o1, Object o2) {
CollationKey key1 = collator.getCollationKey(o1.toString());
CollationKey key2 = collator.getCollationKey(o2.toString());
return key1.compareTo(key2);
}
});
ͬÑùµÀÀí£¬ÈçÏÂÊǶÔList
ͬÑùҲʹÓÃÁËCollectionsµÄ¼¯ºÏÀàÖеÄsort·½·¨À´¶ÔList½øÐÐÅÅÐò,µ«ÊÇÖØÐ´ÁËcomparatorµÄʵÏÖ·½·¨¡£
//ÖÐÎÄÅÅÐò£¬°´»ú¹¹µÄÃû³Æ¡£
Collections.sort(templist, new Comparator(){
Collator collator = Collator.getInstance();
public int compare(Object o1, Object o2) {
TreeBFOEx org1 = (TreeBFOEx)o1;
TreeBFOEx org2 = (TreeBFOEx)o2;
CollationKey key1 = collator.getCollationKey(org1.getDescription());
CollationKey key2 = collator.getCollationKey(org2.getDescription());
return key1.compareTo(key2);
}
});


Ïà¹ØÎĵµ£º

JAVAÅàѵÌâ¿â Servlet

1£®Servlet³ÌÐòµÄÈë¿ÚµãÊÇ£º£¨ £©
A  init£¨£© 
B  main£¨£© 
C  service£¨£© 
D  doGet£¨£©
²Î¿¼´ð°¸£ºA
2. SeverletÖУ¬HttpSeverletResponseµÄʲô·½·¨ÓÃÀ´°ÑÒ»¸öHTTPÇëÇóÖØ¶¨Ïòµ½ÁíÍâµÄURL£¿£¨ £©
A  sendURL()
B  redirectURL()
C  sendRedirect()
D ......

Using Google is AJAX Search API with Java ...

http://www.ajaxlines.com/ajax/stuff/article/using_google_is_ajax_search_api_with_java.php
I was rather depressed over a year ago when Google deprecated their SOAP Search API with their AJAX Search API. Essentially Google was saying that they didn want anyone programmatically accessing Google search ......

JAVA ÅàѵÌâ¿â Spring

Ò»¡¢Spring»ù´¡ÖªÊ¶¼°IOC_Ñ¡ÔñÌâ
1. ÏÂÃæ¹ØÓÚspringÃèÊö´íÎóµÄÊÇ£º£¨ £©
A  SpringÖ§³Ö¿É²åÈëµÄÊÂÎñ¹ÜÀíÆ÷£¬Ê¹ÊÂÎñ»®·Ö¸üÇáËÉ£¬Í¬Ê±ÎÞÐè´¦Àíµ×²ãµÄÎÊÌâ¡£
B  SpringÊÂÎñ¹ÜÀíµÄͨÓóéÏó²ã»¹°üÀ¨JTA²ßÂÔºÍÒ»¸öJDBC DataSource¡£
C  ÓëJTA»òEJB CMTÒ»Ñù£¬SpringµÄÊÂÎñÖ§³ÖÒÀÀµÓÚJava EE»·¾³¡£
D  Spr ......

Java ʱ¼ä²Ù×÷

1.¼ÆËãijһÔ·ݵÄ×î´óÌìÊý
Calendar time=Calendar.getInstance();
time.clear();
time.set(Calendar.YEAR,year); //year Ϊ int
time.set(Calendar.MONTH,i-1);//×¢Òâ,Calendar¶ÔÏóĬÈÏÒ»ÔÂΪ0          
int day=time.getActualMaximum(Calendar.DAY_OF_MONTH) ......

javaÀïÃæÒ»Ð©ÄãÒ²Ðí»¹²»ÖªµÀµÄ¶«Î÷

JavaÀïÃæµÄdnd;
 ½çÃæ±à³ÌÀïÃæÄÜÊìÁ·µÄÔËÓõÄÈ˲»¶à,¶ø¶ÔJavaÖеÄÍÏ×§Öª¸ùÖªµ×µÄÈ˾͸üÉÙÁËÎÒµÄһƪ ÎÄÕÂ-- JavaÖеÄDrag and DropÏê½âÓë´úÂëʾÀý ÀïÃæÓÐÏêϸ½éÉÜ.
java.awt.MouseInfo, java.awt.PointerInfo;
 ÎÒÔø¾­ÏëµÃµ½Êó±êÔÚÆÁÄ»Éϵľø¶ÔλÖÃ,ÎÒÊÔ¹ýͨ¹ýÔÚMouseListenerÀïÃæµÃµ½Êó±êÔÚÒ»¸ö¿Ø¼þÀïÃæµÄÏà¶ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ