²åÈëÅÅÐòËã·¨µÄJAVAʵÏÖ
package Utils.Sort;
/**
*²åÈëÅÅÐò£¬ÒªÇó´ýÅÅÐòµÄÊý×é±ØÐëʵÏÖComparable½Ó¿Ú
*/
public class InsertSort implements SortStrategy
{
/**
*ÀûÓòåÈëÅÅÐòËã·¨¶Ôobj½øÐÐÅÅÐò
*/
public void sort(Comparable []obj)
{
if (obj == null)
{
throw new NullPointerException("The argument can not be null!");
}
/*
*¶ÔÊý×éÖеĵÚi¸öÔªËØ£¬ÈÏΪËüÇ°ÃæµÄi - 1¸öÒѾÅÅÐòºÃ£¬È»ºó½«Ëü²åÈ뵽ǰÃæµÄi - 1¸öÔªËØÖÐ
*/
int size = 1;
while (size < obj.length)
{
insert(obj, size++, obj[size - 1]);
}
}
/**
*ÔÚÒѾÅÅÐòºÃµÄÊý×éÖвåÈëÒ»¸öÔªËØ£¬Ê¹²åÈëºóµÄÊý×éÈÔÈ»ÓÐÐò
*@param obj ÒѾÅÅÐòºÃµÄÊý×é
Ïà¹ØÎĵµ£º
ÏÂÔØÒ»¸öJDKµÄ°²×°°ü£¬ÎÒÏÂÔصÄÊÇjdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008.exe£¬´ó¼Ò¿ÉÒÔÈ¥ÍøÉÏËÑË÷£¬Ò²¿ÉÒÔÈ¥¹Ù·½
ÏÂÔØ¡£
ÏÂÔغ󣬵ã»÷exeÎļþ£¬Ò»Ö±ÏÂÒ»²½µÄ°²×°£¬Óöµ½ÐèҪѡÔñ°²×°Ä¿Â¼µÄ£¬¿ÉÒÔĬÈÏ£¬Ò²¿ÉÒÔ×Ô¼ºÖ¸¶¨£¨ÀýÈçÖ¸¶¨°²×°ÔÚD:\Program Files\Java)
°²×°¹ý³ÌÓÐÁ½´ÎÑ¡Ôñ·¾¶µÄ£¬Ò»´ÎÊǶÔjdk1.6.0_10½ø ......
JavaÖÐͨ¹ýimplements SerializableÀ´ÊµÏÖ¶ÔÏóµÄÐòÁл¯¡£ÆäʵSerializable½Ó¿ÚÖв¢Ã»ÓÐÐèҪʵÏֵķ½·¨£¬×¢Ã÷ij¸öÀàimplements SerializableÖ»ÊÇΪÁ˱êʶ»ò±íÃ÷Õâ¸öÀà¿ÉÒÔ±»ÐòÁл¯¡£
ÄÇôʲôÊÇÐòÁл¯ÄØ£¬ÐòÁл¯ÓÖÓÐʲô×÷ÓÃÄØ£¿
Ò»¸öÀ࣬»ò ......
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍ ......
public static void DownLoadPages(String urlStr, String outPath)
{
int chByte = 0;
URL url = null;
HttpURLConnection httpConn ......