JavaÖØÐ´ÓëÖØÔØ
ÖØÐ´µÄÖ÷ÒªÓŵãÊÇÄܹ»¶¨Òåij¸ö×ÓÀàÌØÓеÄÌØÕ÷:
Èç:
public class Father
{
public void speak()
{
System.out.println("Father");
}
}
public class Son extends Father
{
public void speak()
{
System.out.println("son");
}
}
ÕâÒ²½Ð×ö¶à̬ÐÔ,ÖØÐ´·½·¨Ö»ÄÜ´æÔÚÓÚ¾ßÓм̳йØÏµÖÐ,ÖØÐ´·½·¨Ö»ÄÜÖØÐ´¸¸Àà·Ç˽Óеķ½·¨,
µ±ÉÏÀýÖÐ FatherÀà speak()·½·¨±»privateʱ,SonÀ಻ÄÜÖØÐ´ FatherÀà speak()·½·¨,´ËʱSonÀà speak()·½·¨Ï൱ÓëÔÚSonÀàÖж¨ÒåµÄÒ»¸öspeak()·½·¨.
FatherÀà speak()·½·¨Ò»µ«±»finalʱ,ÎÞÂ۸÷½·¨±»public,protected¼°Ä¬ÈÏËùÐÞÊÎʱ,SonÀà¸ù±¾²»ÄÜÖØÐ´ FatherÀà speak()·½·¨,ÊÔͼ±àÒë´úÂëʱ,±àÒëÆ÷»á±¨´í.Àý:
public class Father
{
fianl public void speak()
{
System.out.println("Father");
&
Ïà¹ØÎĵµ£º
ÔÚjava±à³Ì˼ÏëÖжÔsynchronizedµÄÒ»µã½âÊÍ:
1¡¢synchronized¹Ø¼ü×ÖµÄ×÷ÓÃÓòÓжþÖÖ£º
1£©ÊÇij¸ö¶ÔÏóʵÀýÄÚ£¬synchronized aMethod(){}¿ÉÒÔ·ÀÖ¹¶à¸öÏß³Ìͬʱ·ÃÎÊÕâ¸ö¶ÔÏóµÄsynchronized·½·¨£¨Èç¹ûÒ»¸ö¶ÔÏóÓжà¸ösynchronized·½·¨£¬Ö»ÒªÒ»¸öÏ̷߳ÃÎÊÁËÆäÖеÄÒ»¸ösynchronized·½·¨£¬ÆäËüÏ̲߳»ÄÜͬʱ·ÃÎÊÕâ¸ö¶ÔÏóÖÐÈκÎÒ»¸ö ......
1.
Ôö¼ÓJavaÓ¦ÓÃ
ÔÚandroid_2.1/packages/appsÔö¼Ó¸ÃÏîÄ¿£»
ÔÚbuild/target/product/generic.mkµÄPRODUCT_PACKAGESºóÃæÔö¼Ó¶ÔÓ¦°üµÄÃû×Ö¡£
1.1
´ÓÃüÁîÐ ......
ÓÉÓÚ¹«Ë¾ÒµÎñÔö³¤£¬ÏÖ¼±ÐèÕÐÆ¸·ûºÏÈçÏÂÌõ¼þJAVA¸ß¼¶Èí¼þ¹¤³Ìʦ Èô¸ÉÃû
1¡¢¾ßÓÐÁ¼ºÃµÄjava¼¼Êõ֪ʶºÍ¾Ñ飻
2¡¢¾ß±¸Á¼ºÃµÄ½â¾öÎÊÌâµÄÄÜÁ¦ÒÔ¼°³öÉ«µÄÍŶӺÏ×÷ÄÜÁ¦£»
3¡¢ÊìϤJ2EE¼Ü¹¹ºÍ¿ª·¢Ä£Ê½£¬ÊìϤMVCÉè¼ÆÄ£Ê½£»
4¡¢ÊìϤhibernate¡¢struts2¡¢spring£»
5¡¢Äܰ´Õչ淶µÄÈí¼þ¿ª·¢Á÷³Ì£¬Íê³ÉÈí¼þµÄÐèÇó¡¢Éè¼Æ¡¢±àÂëº ......
try {
String source = "xxx.xls";
InputStream is = new FileInputStream(source);
Workbook rwb = Workbook.getWorkbook(is);
Sheet sheet = rwb.getSheet(0);
for (int i = 1; i < sheet.getRows(); i++) {
for (int j = 1; j < sheet.getColumns(); j++) {
//»ñȡָ¶¨µ¥Ôª¸ñ ......
È¡µÃµ±Ç°ÏµÍ³Ê±¼ä System.currentTimeMillis()
·µ»ØºÁÃëʱ¼ä£¬ÎªlongÐÍÕûÊý£¬
¸Ãº¯ÊýÔÚ½øÐÐϵͳÐÔÄÜ¼à¿ØÊ±×î³£Óõ½
Àý£º
long start = System.currentTimeMillis();
//Òª¼à¿ØµÄ´úÂë¶Î
long end = System.currentTimeMillis();
System.out.println(end-start);
ÓÐʱҪ¼à¿Øµ ......