java»Øµ÷
1javaÖÐÅÅÐòËã·¨µÄ»Øµ÷
±àдͨÓõÄÅÅÐò´úÂëʱ£¬ÃæÁÙµÄÒ»¸öÎÊÌâ¾ÍÊDZØÐë¸ù¾Ý¶ÔÏóµÄʵ¼ÊÀàÐÍÀ´Ö´ÐбȽÏÔËË㣬´Ó¶øʵÏÖÕýÈ·µÄÔËËã¡£³ÌÐòÉè¼ÆµÄÖ÷ҪĿ±ê¾ÍÊÇ“½«·¢Éú±ä»¯µÄ¶«Î÷Óë±£³Ö²»±äµÄ¶«Î÷·Ö¿ª” £¬ÔÚÕâÀï±£³Ö²»±äµÄ²¿·Ö¾ÍÊdzÌÐòËã·¨£¬¶øÿ´ÎʹÓÃʱ¶¼Òª±ä»¯µÄÊǶÔÏóµÄʵ¼Ê±È½ÏËã·¨¡£ËùÒÔÎÒÃDzÉÓûص÷£¬½«¾³£·¢
Éú±ä»¯µÄµÄÄDz¿·Ö´úÂ룬·â×°µ½Ëü×Ô¼ºµÄÀàÖУ¬ÕâÑùÒ»À´ £¬ ²»Í¬µÄ¶ÔÏó¾Í¿ÉÒÔ±í´ï²»Í¬µÄ±È½Ï·½Ê½£¬Í¬Ê±ÏòËûÃÇ´«µÝÏàͬµÄÅÅÐò´úÂë¡£
ÏÂÃæµÄ½Ó¿ÚչʾÁËÈçºÎ±È½ÏÁ½¸ö¶ÔÏó£¬Ëü½«“Òª·¢Éú±ä»¯µÄ¶«Î÷·â×°ÆðÀ´”¡£package cn.bupt.sort;
import java.util.*;
public class SortVector extends Vector{
private Compare compare ;
public SortVector(Compare compare){
this.compare = compare ;
}
public void sort(){
}
private void quickSort(int left ,int right){
if(right > left){
Object o1 = elementAt(right);
int i = left -1 ;
int j = right ;
while(true){
while(compare.lessThan(this.elementAt(++i), o1)) ;
while(j>0)
if(compare.lessOrEqualThan(--j, o1))
break ;
if(i>= j) break;
swap(i , j);
}
swap(i , right);
quickSort(left , i - 1);
quickSort(i + 1 ,right);
}
}
private void swap(int loc1 ,int loc2){
Object tmp = this.elementAt(loc1) ;
this.setElementAt(this.elementAt(loc2), loc1) ;
this.setElementAt(tmp, loc2) ;
}
}
ΪʹÓÃSortVector ±ØÐë´´½¨Ò»¸öÀ࣬ÁîÆäΪÎÒÃÇʵÏÖµÄÅÅÐò¶ÔÏóʵÏÖCompare¡£Ò»µ©ÉèÖúÿò¼Ü£¬¾Í¿ÉÒԷdz£·½±ãµÄÖظ´Ê¹ÓÃÕâÒ»Éè¼Æ£¬Ö»Ðè¼òµ¥µÄ·â×°Ò»¸öÀ࣬Ȼºó´«µÝ¸øSortVector¼´¿É¡£
javaÈý´ó ½áºÏ×é¼þ
Map Set List
List
ArrayList ÊʺÏËæ»ú·ÃÎÊ£¬µ«ÊDz»ÊʺÏɾ³ýºÍÌí¼Ó²Ù×÷¡£
LinkedList ÊʺÏɾ³ýºÍÌí¼Ó²Ù×÷£¬µ«ÊDz»ÊʺÏËæ¼´·ÃÎÊ¡£
Set
Ìí¼Óµ½SetÖеÄÔªËرØÐëÊÇΨһµÄ£¬Ìí¼Óµ½setÖеĶÔÏ󣬱ØÐëʵÏÖequals()·½·¨¡£
HashSet ÓÃÓڷdz£Ð¡µÄSetÒÔÍâµÄËùÓÐSet,¶ÔÏó¶¨Òå±ØÐëʵÏ
Ïà¹ØÎĵµ£º
Ç°ÑÔ
±¾ÎÄÇ°ÑÔ²¿·ÖΪÎÒµÄһЩ¸ÐÏ룬Èç¹ûÄãÖ»¶Ô±¾ÎĽéÉܵÄJavaʵÓü¼ÇɸÐÐËȤ£¬¿ÉÒÔÌø¹ýÇ°ÑÔÖ±½Ó¿´ÕýÎĵÄÄÚÈÝ¡£
±¾ÎĵÄд×÷¶¯»úÀ´Ô´ÓÚ×î½ü½Ó¸øÈ˼ҰïæдµÄÒ»¸öС³ÌÐò£¬Ö÷ÒªÓÃÓÚ¹ÜÀí·ÖÆÚ¸¶¿îµÄ»õ¿îµÄһϵÁйÜÀí£¬°üÀ¨¹ýÆÚ¿îµÄ¼Í¼£¬¹ýÆÚ¿îÀûÏ¢µÄ¼ÆË㣬ΪÌáÇ°¸¶¿îµÄÓû§ÌṩһЩ·µ¿î½±ÀøµÈµÈ£¬ÕâЩÓë±¾ÎÄÎÞ¹Ø×Ô²»±Øϸ˵¡£ ......
ÒªÏë½â¾ö“ÔàÊý¾Ý”µÄÎÊÌ⣬×î¼òµ¥µÄ·½·¨¾ÍÊÇʹÓÃsynchronized¹Ø¼ü×ÖÀ´Ê¹run·½·¨Í¬²½£¬´úÂëÈçÏ£º
public synchronized void run()
{
}
´ÓÉÏÃæµÄ´úÂë¿ÉÒÔ¿´³ö£¬Ö»ÒªÔÚvoidºÍpublicÖ®¼ä¼ÓÉÏsynchronized¹Ø¼ü×Ö£¬¾Í¿ÉÒÔʹrun·½·¨Í¬²½£¬Ò²¾ÍÊÇ˵£¬¶ÔÓÚͬһ¸öJavaÀàµÄ¶ÔÏóʵÀý£¬run·½·¨Í¬ ......
JAVAÔÚÏßapi
2009Äê06ÔÂ07ÈÕ 17:06
1.Hibernate API Documentation (3.2.2.ga)
http://www.hibernate.org/hib_docs/v3/api/
2.Spring Framework API 2.5
http://static.springframework.org/spring/docs/2.5.x/api/index.html
3.Struts 1.3.8 API
http://struts.apache.org/1.3.8/apidocs/index.html
4.Struts 2 Co ......
Java ÔÓ̸£¨Èý£©
ÕâÒѾ±ÊÕßдµÄµÚÈýƪJavaÔÓ¼ÇÁË£¬ÇìÐÒÇ°Á½ÆªÒ»Ö±µÃµ½ÂÛ̳ÅóÓÑÃǵÄÖ§³Ö¹ÄÀø£¬»¹Íû´ó¼Ò¼ÌÐøÖ¸Õý²»×ãÖ®´¦¡£±ÊÕßÒ²Ò»Ö±¿ÊÍûͨ¹ýÕâÑù·½Ê½ÇåÐѵÄ×ÔÉó£¬À´Ñ°ÕÒ×Ô¼º¼¼ÊõÉϵIJ»×ãÖ®´¦£¬Ï£ÍûºÍ¹²Í¬°®ºÃJavaµÄͬÈÊÃÇÒ»ÆðÌá¸ß¡£
& ......