JavaÖØдÓëÖØÔØ
ÓÐʱºò£¬ÀàµÄͬһÖÖ¹¦ÄÜÓжàÖÖʵÏÖ·½Ê½£¬µ½µ×²ÉÓÃÄÇÖÖʵÏÖ·½Ê½£¬È¡¾öÓÚµ÷ÓÃÕß
¸ø¶¨µÄ²ÎÊý¡£ÀýÈçÔÓ¼¼Ê¦ÄÜѵÁ·¶¯Î¶ÔÓÚ²»Í¬µÄ¶¯ÎïÓв»Í¬µÄѵÁ··½Ê½¡£
public void train
(Dog dog){
//
ѵÁ·Ð¡¹·Õ¾Á¢£¬ÅŶӣ¬×öËãÊý
}
public void
train(Monkey monkey){
//
ѵÁ·ºï×ÓÆï×ÔÐгµµÈ
}
ÔÙÈçij¸öÀàµÄÒ»¸ö¹¦ÄÜÊDZȽÏÁ½¸ö³ÇÊÐÊÇ
·ñÏàͬ£¬Ò»ÖÖ·½Ê½ÊDZȽÏÁ½¸ö³ÇÊеÄÃû×Ö£¬Ò»ÖÖÊdzýÁ˱ȽÏÁ½¸ö³ÇÊеÄÃû×ÖÍ⣬»¹Òª±È½ÏËùÔÚ¹ú¼ÒµÄÃû×Ö¡£
publi boolean
isSameCity (String city1,String city2){
return
city1.equals(city2);
}
public boolean
isSameCity(String city1,String city2,Stirng Country1,String Country2){
return
isSameCity(city1,city2)&&Country1.equals(Country2);
}
ÔÚÀýÈç java.lang.Math
ÀàµÄ max
£¨£©·½
·¨Äܹ»´ÓÁ½¸öÊý×ÖÖÐÈ¡³ö×î´óÖµ£¬ËüÓжàÖÖʵÏÖ·½Ê½¡£
public static int
max(int a,int b)
public static int
max(long a, long b)
public static int
max(float a,float b)
ÒÔϳÌÐò¶à´Îµ÷ÓÃMath
ÀàµÄmax()
·½·¨£¬ÔËÐÐʱ£¬Java
ÐéÄâ»úÏÈÅжϸø¶¨²ÎÊýµÄÀàÐÍ£¬È»ºó¾ö¶¨µ½µ×Ö´ÐÐÄĸö
max()
·½·¨¡£
//
²ÎÊýΪ
int
ÀàÐÍ£¬Òò´ËÖ´ÐÐmax
£¨int
a, int b
£©·½·¨
·
Math.max(1,
Ïà¹ØÎĵµ£º
×î½ü¹«Ë¾Åöµ½ÐèÒªÓÃͼ±íµÄÐÎʽÏÔʾһЩÊý¾Ý£¬ÎҾͿªÊ¼µ½ÍøÉϲéѯ£¬²éµ½ÁËjfreechartºÍamcharts,ÕâÁ½ÕßÎÒ¶¼ÊµÏÖ¹ýÁË£¬jfreechart×îºóÉú³ÉͼƬ£¬µ«ÊÇͼƬЧ¹û²»ÊÇÎÒÏëÒªµÄ£¬È»ºóÓÖÑо¿amcharts ËüµÄЧ¹ûȷʵºÜºÃ£¬¶øÇÒ¹Ù·½ÍøÕ¾ÉÏ»¹ÓкÃЩÀý×ӿɹ©ÏÂÔØ£¬ÍøÖ·ÊÇ:www.amcharts.com
£¨ÏëÒªÍê³ÉÒ»¸öamchartsͼÐÎÐèÒªswfobjects. ......
ÔÚjava.util °üÏÂÃæÓÐÒ»¸öÀà Properties£¬¸ÃÀàÖ÷ÒªÓÃÓÚ¶ÁÈ¡ÒÔÏîÄ¿µÄÅäÖÃÎļþ£¨ÒÔ£®properties½áβµÄÎļþºÍxmlÎļþ£©¡£
PropertiesµÄ¹¹Ô캯ÊýÓÐÁ½¸ö£¬Ò»¸ö²»´ø²ÎÊý£¬Ò»¸öʹÓÃÒ»¸öProperties¶ÔÏó×÷Ϊ²ÎÊý¡£
ʹÓÃProperties¶ÁÈ¡£®propertiesÎļþ
test.propertiesÎļþÈçÏ£º
#²âÊÔ»·¾³ÅäÖãºÆ½Ì¨Â·¾¶ÅäÖÃ
jstrd_home=D:/T ......
Ò». Êý×é
. ÕýÈ·µÄ¶¨Òå: int num[]; num= new int[5] //Ö»ÓÐÓÃnew¹Ø¼ü×ÖÕæÕý´´½¨Êý×éʱ²Å¿ÉÒÔ¸ø¶¨ËüµÄ´óС
´íÎóµÄ¶¨Òå: int num[5];
. ³£¼ûµÄÊý×é´íÎóΪ : ArrayIndexOutOfBoundsException (Êý×éÔ½½ç´íÎó)
. Êý×éµÄά¶ ......
×ܵĸñʽÊÇ£º
%[argument_index$][flags][width][.precision]conversion
ÀýÈ磺
%2$-5.2s
//2$£ºÈ¡µÚ¶þ¸ö²ÎÊý
//-: Ö¸¶¨Îª×ó¶ÔÆ룬ĬÈÏÓÒ¶ÔÆë
//5£º×î´óÊä³ö¿í¶ÈΪ20,²»¹»»á²¹¿Õ¸ñ£¬Êµ¼ÊÈô³¬¹ýÔòÈ«²¿Êä³ö
//.2£ºÔڴ˱íʾÊä³ö²ÎÊý2µÄ×î´ó×Ö·ûÊýÁ¿£¬Èç¹ûÊǸ¡µãÊý×Ö£¬Ôò±íʾСÊý²¿·ÖÏÔʾµÄλÊý
//s £º±íʾÊäÈë²ÎÊýÊÇ×Ö ......
´ó¼ÒÔÚÈ¥²Î¼ÓÃæÊÔµÄʱºò£¬¾³£»áÓöµ½ÕâÑùµÄ¿¼Ì⣺¸øÄãÁ½¸öÀàµÄ´úÂ룬ËüÃÇÖ®¼äÊǼ̳еÄ
¹Øϵ£¬Ã¿¸öÀàÀïÖ»Óй¹ÔìÆ÷·½·¨ºÍһЩ±äÁ¿£¬¹¹ÔìÆ÷Àï¿ÉÄÜ»¹ÓÐÒ»¶Î´úÂë¶Ô±äÁ¿Öµ½øÐÐÁËij
ÖÖÔËË㣬ÁíÍ⻹ÓÐһЩ½«±äÁ¿ÖµÊä³öµ½¿ØÖÆ̨µÄ´úÂ룬ȻºóÈÃÎÒÃÇÅжÏÊä³öµÄ½á¹û¡£Õâʵ¼Ê
ÉÏÊÇÔÚ¿¼²éÎÒÃǶÔÓڼ̳ÐÇé¿öÏÂÀàµÄ³õʼ»¯Ë³ÐòµÄÁ˽⡣
ÎÒ ......