java jdk5Öз½·¨µÄÖØÔØÓëÖØд
JavaÓïÑÔÖеĸÅÄî¾ÍÊǶ࣬Õâ»ØÓÖÓÐÁ½¸ö¸ÅÄÖØÔغÍÖØд¡£ÕâÊÇÁ½¸öиÅÄҲÊÇÁ½¸öÁî³õѧÕßÈÝÒ×»ìÏýµÄ¸ÅÄî¡£ËûÃǵĸÅÄî½ØÈ»²»Í¬£¬Ö»²»¹ý¶¼Óиö“ÖØ”×Ö£¬¾ÍÒÔΪÊǺÜÏñµÄ¡£ÏÂÃæ½âÊÍÒ»ÏÂÕâÁ½¸ö¸ÅÄ
·½·¨ÖØÔØ(overloading method) ÊÇÔÚÒ»¸öÀàÀïÃ棬·½·¨Ãû×ÖÏàͬ£¬¶ø²ÎÊý²»Í¬¡£·µ»ØÀàÐÍÄØ£¿¿ÉÒÔÏàͬҲ¿ÉÒÔ²»Í¬¡£
·½·¨ÖØд(overiding method) ×ÓÀ಻ÏëÔ·â²»¶¯µØ¼Ì³Ð¸¸ÀàµÄ·½·¨£¬¶øÊÇÏë×÷Ò»¶¨µÄÐ޸ģ¬Õâ¾ÍÐèÒª²ÉÓ÷½·¨µÄÖØд¡£·½·¨ÖØдÓֳƷ½·¨¸²¸Ç¡£Èç¹û»¹ÊǸã»ìµÄ»°£¬¾Í°Ñ“ÖØд¸²¸Ç”£¬Õâ¸ö´Ê¶àÄ±é°É¡£ÖªµÀÊǸ²¸ÇµÄ»°£¬¾ÍÖªµÀÊÇ×ÓÀา¸Ç¸¸ÀàµÄ·½·¨ÁË¡£
ʵ¼ù£º ÖØÔصÄÀý×Ó
public class MethodOverloading { void recieve(int i) { System.out.println("½ÓÊÕÒ»¸öintÊý¾Ý"); System.out.println("i="+i); } void recieve(float f) { System.out.println("½ÓÊÜÒ»¸öfloatÐ͵ÄÊý¾Ý"); System.out.println("f="+f); } void recieve(String s) { System.out.println("½ÓÊÜÒ»¸öStringÐÍÊý¾Ý"); System.out.println("s="+s); }
public static void main(String[] args){
MethodOverloading m = new MethodOverloading();
m.recieve(3456);
m.recieve(34.56);
m.recieve(“°Ù¼ÒÈÈí¼þÏîÄ¿Ñо¿ÊÒ“);
}}
´ó¼Ò¿´µ½ÁËÉÏÃæµÄÀý×Ó·½·¨receive()ÓÐÈý¸ö£¬Ãû×ÖÏàͬ²ÎÊý²»Í¬¡£ÕâÑùµÄ»°£¬ÔÚmain()µ÷ÓõÄʱºò£¬²ÎÊýÓÃÆðÀ´¾ÍºÜ·½±ãÁË¡£ÖØдµÄÀý×ÓËƺõ²»ÓþÙÁË£¬¼Ç²»×¡µÄ»°£¬¾ÍºÍ“¸²¸Ç”¡£Ò»ÆðÄî¡£
ÓÐʱºò£¬ÖØÔغÍÖØдµÄ·½Ê½ÓÐЩ¸´ÔÓ£¬ÔÚjdk5ÀïÃæ¡£ÓÐһЩ·½Ê½Äܼò»¯Ò»Ð©¡£ÎÒÃÇÀ´¿´¿´°É£¬jdk5µÄ¿É±ä²ÎÊý¡£ Èç¹û°ÑÏàͬ²ÎÊýÀàÐ͵ķ½·¨ÖØÔغü¸±éÕæµÄÊǺܷ³¡£¾ÍÒ»¸ö·½·¨£¬pri(String args), pri(String arg0 ,String arg1), pri(String arg0,String arg1,String arg2), pri(String arg0,String arg1,String arg2,String arg3)¡£ÕâÑùµÄ»°»áдºÜ¶à·³ËöµÄ´úÂë¡£ÏÖÔÚjdk5¿ÉÒÔ£¬ÓÓ…”À´´úÌæÕâЩ²ÎÊý¡£Êµ¼ù£º
public class overload {
//Èô¸É¸öÏàͬÀàÐ͵IJÎÊý£¬ÓÓ...”´úÌæ
public void pri(String... strings ){
for (String str : strings) //forÕâ¸öÑ»·Óï¾äÒ²Óеü´úµÄÒâ˼
System.out.print(str);
}
public static void main(String[] args){
new overload().pri("100jq"," °Ù¼ÒÈÈí¼þÏîÄ¿Ñо¿ÊÒ"," www.100jq.com");
}
}
jdk5µÄ·½·¨ÖØд£¬±ÈÒÔÇ°¶àÁËÒ»¸ö½Ð×öбä·
Ïà¹ØÎĵµ£º
-
Êý¾Ý¿â²¿·Ö:
1.¾ÙÀý˵Ã÷Dynamic SQLµÄÔÀí¼°Ó¦Óã¿
2.¾ÙÀý˵Ã÷Êý¾Ý¿âË÷ÒýµÄÓÅȱµã£¿
3.Èç¹ûÓÉÄãÀ´Éè¼ÆÊý¾ÝµÄrollback,ÄãµÄ˼·ºÍ·½°¸£¿
4.¼ÙÉèÓÐÒ»¸ötable£¬ÃûΪpages£¬ÓÐËĸö×Ö¶Î,id ,url,title,body¡£ÀïÃæ´¢Á˺ܶàÍøÒ³£¬ÍøÒ³µÄurlµØÖ·£¬titleºÍÍøÒ³ÄÚÈÝ£¬ÓÃÒ»¸ö
sql²éѯ½«urlÆ¥ÅäµÄÅÅÔÚ×îÇ°Ã棬titleÆ¥ÅäµÄ ......
-
JavaÊÇÓÉSun Microsystems¹«Ë¾ÓÚ1995Äê5ÔÂÍƳöµÄJava³ÌÐòÉè¼ÆÓïÑÔ£¨ÒÔϼò³ÆJavaÓïÑÔ£©ºÍJavaƽ̨µÄ×ܳơ£ÓÃJavaʵÏÖµÄHotJavaä¯ÀÀÆ÷£¨Ö§³ÖJava applet£©ÏÔʾÁËJavaµÄ÷ÈÁ¦£º¿çƽ̨¡¢¶¯Ì¬µÄWeb¡¢Internet¼ÆËã¡£´Ó´Ë£¬Java±»¹ã·º½ÓÊܲ¢Íƶ¯ÁËWebµÄѸËÙ·¢Õ¹£¬³£ÓõÄä¯ÀÀÆ÷ÏÖÔÚ¾ùÖ§³ÖJava applet¡£ÁíÒ»·½Ã棬Java¼¼ÊõÒ ......
Èí»Ø³µ£¨Soft Return£©£ºÈí»Ø³µÊÇÔÚ×Ö´¦Àí³ÌÐòÖÐ×÷Ϊ×Ô¶¯ÒÆÐй¦ÄܵÄÒ»²¿·Ö×Ô¶¯²åÈëµÄ£¬Ò²½Ð»»Ðзû£¬ÔÚwordÖп´²»¼û¡£Èç¹ûÎı¾
Ò»Ðеij¤¶È³¬¹ýÎĵµËù¶¨ÒåµÄÓұ߾àʱ£¬¼´µ±Ç°ÐÐûÓÐ×ã¹»µÄ¿Õ¼ä·ÅÖÃÏÂÒ»¸ö×Ö·ûʱ£¬ÎÄ×Ö´¦ÀíÈí¼þ½«ÔÚÕâÒ»ÐÐÎı¾µÄĩβ×Ô¶¯²åÈëÒ»
¸öÈí»Ø³µ·û£¬Îı¾ÁíÆðÒ»ÐС£Õâ¸öÈí»Ø³µ·ûÊÇÓɱ༳ÌÐò×Ô¶¯² ......
×î½ü×ö¸öÏîÄ¿£¬¾ÍÊÇҪȡµÃcpuÕ¼ÓÐÂʵȵȵÄϵͳÐÅÏ¢£¬Ò»¿ªÊ¼ÒÔΪҪÓö¯Ì¬Á´½Ó¿âÁË£¬µ«ºóÀ´·¢ÏÖ¿ÉÒÔÏñÏÂÃæÕâÑù×ö£¬²»È¥µ÷ÓÃjni£¬ÕâÑùÊ¡È¥Á˺ܶ࿴м¼ÊõµÄʱ¼äo(∩_∩)o...
ÔÚJavaÖУ¬¿ÉÒÔ»ñµÃ×ܵÄÎïÀíÄڴ桢ʣÓàµÄÎïÀíÄÚ´æ¡¢ÒÑʹÓõÄÎïÀíÄÚ´æµÈÐÅÏ¢£¬ÏÂÃæÀý×Ó¿ÉÒÔÈ¡µÃÕâЩÐÅÏ¢£¬²¢ÇÒ»ñµÃÔÚWindowsϵÄÄÚ´æʹÓà......
¡¡1¡¢»ù±¾¸ÅÄî¼°ÔÀí
¡¡¡¡ÎÒÃÇÖªµÀ£¬¶ÔÓÚ¹²Ïí×ÊÔ´£¬ÓÐÒ»¸öºÜÖøÃûµÄÉè¼Æģʽ£º×ÊÔ´³Ø(Resource Pool)¡£¸ÃģʽÕýÊÇΪÁ˽â¾ö×ÊÔ´µÄƵ·±·ÖÅä?ÊÍ·ÅËùÔì³ÉµÄÎÊÌ⡣Ϊ½â¾öÉÏÊöÎÊÌ⣬¿ÉÒÔ²ÉÓÃÊý¾Ý¿âÁ¬½Ó³Ø¼¼Êõ¡£Êý¾Ý¿âÁ¬½Ó³ØµÄ»ù±¾Ë¼Ïë¾ÍÊÇΪÊý¾Ý¿âÁ¬½Ó½¨Á¢Ò»¸ö“»º³å³Ø”¡£Ô¤ÏÈÔÚ»º³å³ØÖзÅÈëÒ»¶¨ÊýÁ¿µÄÁ¬½Ó£¬µ±Ð ......