JAVAÖеÄArray.sort£¨£©·½·¨
»¨Á˵ãʱ¼äÈ¥Ñо¿£¬Ò²ËãСÓÐÊÕ»ñ£º
Arrays.sort()·½·¨ÔÚJDKÀïÓкܶ࣬ÆäÖÐ×ÅÖØËµÏÂ
static void
sort(Object[] a)
static
<T> void
sort(T[] a, Comparator<? super T> c)
ǰÕß²ÎÊýÖеÄÊý×éaÖеÄËùÓÐÔªËØ±ØÐëʵÏÖcomparable½Ó¿Ú£¬¿ÉÒÔÖØÔØcomparableµÄ·½·¨compareTo£¨£©¡£
ºóÕß²ÎÊýÖеÄÊý×éaÖеÄËùÓÐÔªËØ±ØÐëʵÏÖcomparable½Ó¿Ú£»²ÎÊýÖеÄComparatorÒýÓÃc ÊÇ¿ØÖÆÅÅÐò˳ÐòµÄ£¬¿ÉÒÔͨ¹ýʵÏÖComparatorÈ»ºóÖØÔØÆäcompare·½·¨À´¶¨Òå¡£
Èô²»ÖØÔرȽϷ½·¨£¬Ôò½á¹ûΪ×ÔÈ»ÅÅÐò¡£
Ïà¹ØÎĵµ£º
¿´µ½Ò»µÀjavaÌ⣬¸Ð¾õºÜ²»´í,ÎÒÔÚÔÀ´µÄ°æ±¾ÉÏÔö¼ÓÁËЩ´úÂ룬һÆðÀ´¿´¿´ÏÂÃæµÄ´úÂ뽫Êä³öʲô
class Father{
int i,j;
Father(){
add(1);
}
void add(int v){
i+=v;
j+=v;
}
void print(){
System.out.println("i:="+i);
System.out.println("j:="+j);
}
}
class C ......
±¾ÎÄÀ´×ÔºÍÄãÔÚÒ»ÆðµÄ²©¿Í£¬ÔÎıêÌ⣺¡¶JVMµ÷ÓÅ×ܽá(¶þ)-һЩ¸ÅÄî¡·¡£±¾ÎÄ×ܽáÁËJVM¸ÅÄîÖеÄJava¶ÔÏóµÄ´óС£¬ÒÔ¼°ÈýÖÖÒýÓÃÀàÐ͵͍ÒåÓëÇø·Ö¡£ »ù±¾Êý¾ÝµÄÀàÐ͵ĴóСÊǹ̶¨µÄ£¬ÕâÀï¾Í²»¶à˵ÁË¡£¶ÔÓÚ·Ç»ù±¾ÀàÐ͵ÄJava¶ÔÏ󣬯ä´óС¾ÍÖµµÃÉÌȶ¡£ ÔÚJavaÖУ¬Ò»¸ö¿ÕObject¶ÔÏóµÄ´óСÊÇ8byte£¬Õâ¸ö´óСֻÊDZ£´æ¶ÑÖÐÒ»¸öûÓÐÈÎ ......
ÔÎÄÁ´½Ó£ºhttp://student.csdn.net/space.php?uid=22846&do=thread&id=205&page=1
1¡¢Óï·¨
£º±ØÐë±È½ÏÊìϤ£¬ÔÚд´úÂëµÄʱºòIDEµÄ±à¼Æ÷¶ÔijһÐб¨´íÓ¦¸ÃÄܹ»¸ù¾Ý±¨´íÐÅÏ¢ÖªµÀÊÇʲôÑùµÄÓï·¨´íÎó²¢ÇÒÖªµÀÈκÎÐÞÕý¡£
2¡¢ÃüÁî
£º±ØÐëÊìϤJDK´øµÄһЩ³£ÓÃÃüÁî¼°Æä³£ÓÃÑ¡ÏÃüÁîÖÁÉÙÐèÒªÊìϤ£ºappletviewer¡ ......
ÈçºÎÓÃJava»ñµÃÒ»¸öÓòÃûµÄIPµØÖ·ÄØ£¿ÌṩÕâ¸ö¹¦ÄܵÄÀà½Ð×öjava.net.InetAddress¡£ÎÒÃǼÙÉèÏÖÔÚÓÐÕâÑùÒ»¸öÓòÃû£¬ËüÓÃÒ»¸ö¾²Ì¬µÄ
getByNameÀ´ÖØÐ»ñµÃÒ»¸öInetAddress£¬È»ºóµÃµ½¿ÉÒÔ¶Á³öµÄIPµØÖ·¡£ÏÂÃæµÄ´úÂëÊǷdz£»ù±¾µÄÃüÁîÐС£
import java.net.InetAddress;
import java.net.Unknow ......
ºÃ¶à´óÐÍµÄÆóÒµÏîÄ¿¶¼ÒªÓõ½¸ß¼¶JDBCÁ¬½ÓÊý¾Ý¿âÅäÖø߼¶JDBCʵÀýÈçÏ£º
µÚÒ»£ºÅäÖÃTomcatϵÄconfÎļþ¼ÐϵÄcontext.xmlÎļþ
<?xml version='1.0' encoding='utf-8'?>
<Context>
<Resource name="jdbc/Ãû³Æ" auth="Container" type="javax.sql.DataSource"
maxActive="10" maxIdle=" ......