Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

javaÖÐabstractÓëinterface

   abstract  classºÍinterfaceÊÇJavaÓïÑÔÖжÔÓÚ³éÏóÀඨÒå½øÐÐÖ§³ÖµÄÁ½ÖÖ»úÖÆ£¬ÕýÊÇÓÉÓÚÕâÁ½ÖÖ»úÖƵĴæÔÚ£¬²Å¸³ÓèÁËJavaÇ¿´óµÄÃæÏò¶ÔÏóÄÜÁ¦¡£ abstract  classºÍinterfaceÖ®¼äÔÚ¶ÔÓÚ³éÏóÀඨÒåµÄÖ§³Ö·½Ãæ¾ßÓкܴóµÄÏàËÆÐÔ£¬ÉõÖÁ¿ÉÒÔÏ໥Ìæ»»£¬Òò´ËºÜ¶à¿ª·¢ÕßÔÚ½øÐгéÏóÀඨÒåʱ¶ÔÓÚ abstract  classºÍinterfaceµÄÑ¡ÔñÏԵñȽÏËæÒâ¡£Æäʵ£¬Á½ÕßÖ®¼ä»¹ÊÇÓкܴóµÄÇø±ðµÄ£¬¶ÔÓÚËüÃǵÄÑ¡ÔñÉõÖÁ·´Ó³³ö¶ÔÓÚÎÊÌâÁìÓò±¾ÖʵÄÀí½â¡¢¶ÔÓÚÉè¼ÆÒâͼµÄÀí½âÊÇ·ñÕýÈ·¡¢ºÏÀí¡£±¾ÎĽ«¶ÔËüÃÇÖ®¼äµÄÇø±ð½øÐÐÒ»·¬ÆÊÎö£¬ÊÔͼ¸ø¿ª·¢ÕßÌṩһ¸öÔÚ¶þÕßÖ®¼ä½øÐÐÑ¡ÔñµÄÒÀ¾Ý¡£
 
    Ò»¡¢Àí½â³éÏóÀà abstract classºÍinterfaceÔÚJavaÓïÑÔÖж¼ÊÇÓÃÀ´½øÐгéÏóÀࣨ±¾ÎÄÖеijéÏóÀಢ·Ç´Óabstract class·­Òë¶øÀ´£¬Ëü±íʾµÄÊÇÒ»¸ö³éÏóÌ壬¶øabstract classΪJavaÓïÑÔÖÐÓÃÓÚ¶¨Òå³éÏóÀàµÄÒ»ÖÖ·½·¨£¬Çë¶ÁÕß×¢ÒâÇø·Ö£©¶¨ÒåµÄ£¬ÄÇôʲôÊdzéÏóÀ࣬ʹÓóéÏóÀàÄÜΪÎÒÃÇ´øÀ´Ê²Ã´ºÃ´¦ÄØ£¿ÔÚÃæÏò¶Ô ÏóµÄ¸ÅÄîÖУ¬ÎÒÃÇÖªµÀËùÓеĶÔÏó¶¼ÊÇͨ¹ýÀàÀ´Ãè»æµÄ£¬µ«ÊÇ·´¹ýÀ´È´²»ÊÇÕâÑù¡£²¢²»ÊÇËùÓеÄÀ඼ÊÇÓÃÀ´Ãè»æ¶ÔÏóµÄ£¬Èç¹ûÒ»¸öÀàÖÐûÓаüº¬×ã¹»µÄÐÅÏ¢À´Ãè»æÒ»¸ö¾ßÌåµÄ¶ÔÏó£¬ÕâÑùµÄÀà¾ÍÊdzéÏóÀà¡£³éÏóÀàÍùÍùÓÃÀ´±íÕ÷ÎÒÃÇÔÚ¶ÔÎÊÌâÁìÓò½øÐзÖÎö¡¢Éè¼ÆÖеóöµÄ³éÏó¸ÅÄÊǶÔһϵÁп´ÉÏÈ¥²»Í¬£¬µ«ÊDZ¾ÖÊÉÏÏàͬµÄ¾ßÌå¸ÅÄîµÄ³éÏó¡£±ÈÈ磺Èç¹ûÎÒÃǽøÐÐÒ»¸öͼÐα༭Èí¼þµÄ¿ª·¢£¬¾Í»á·¢ÏÖÎÊÌâÁìÓò´æÔÚ×ÅÔ²¡¢Èý½ÇÐÎÕâÑùһЩ¾ßÌå¸ÅÄËüÃÇÊDz»Í¬µÄ£¬µ«ÊÇËüÃÇÓÖ¶¼ÊôÓÚÐÎ×´ÕâÑùÒ»¸ö¸ÅÄÐÎ×´Õâ¸ö¸ÅÄîÔÚÎÊÌâÁìÓòÊDz»´æÔڵģ¬Ëü¾ÍÊÇÒ»¸ö³éÏó¸ÅÄî¡£ÕýÊÇÒòΪ³éÏóµÄ¸ÅÄîÔÚÎÊÌâÁìÓòûÓжÔÓ¦µÄ¾ßÌå¸ÅÄËùÒÔÓÃÒÔ±íÕ÷³éÏó¸ÅÄîµÄ³éÏóÀàÊDz»Äܹ»ÊµÀý»¯µÄ¡£ ÔÚÃæÏò¶ÔÏóÁìÓò£¬³éÏóÀàÖ÷ÒªÓÃÀ´½øÐÐÀàÐÍÒþ²Ø¡£ÎÒÃÇ¿ÉÒÔ¹¹Ôì³öÒ»×é¹Ì¶¨ÐÐΪµÄ³éÏóÃèÊö£¬µ«ÊÇÕâ×éÐÐΪȴÄܹ»ÓÐÈÎÒâ¸ö¿ÉÄܵľßÌåʵÏÖ·½Ê½¡£Õâ¸ö³éÏóÃèÊö¾ÍÊdzéÏóÀ࣬¶ø¾ßÌåʵÏÖÔò±íÏÖΪÅÉÉúÀࡣģ¿é¿ÉÒÔ²Ù×÷Ò»¸ö³éÏóÌå¡£ÓÉÓÚÄ£¿éÒÀÀµÓÚÒ»¸ö¹Ì¶¨µÄ³éÏóÌ壬Òò´ËËü¿ÉÒÔÊDz»ÔÊÐíÐ޸ĵģ»Í¬Ê±£¬Í¨¹ý´ÓÕâ¸ö³éÏóÌåÅÉÉú£¬Ò²¿ÉÀ©Õ¹´ËÄ£¿éµÄÐÐΪ¹¦ÄÜ¡£ÊìϤOCPµÄ¶ÁÕßÒ»¶¨ÖªµÀ£¬ÎªÁËÄܹ»ÊµÏÖÃæÏò¶ÔÏóÉè¼ÆµÄÒ»¸ö×îºËÐĵÄÔ­ÔòOCP(Open-Closed Principle)£¬³éÏóÀàÊÇÆäÖеĹؼüËùÔÚ¡£
   
    ¶þ¡¢´ÓÓï·¨¶¨Òå²ãÃæ¿´abstract classºÍinterface ÔÚÓï·¨²ãÃ棬JavaÓïÑÔ¶ÔÓÚabstract classºÍinterface¸ø³öÁË


Ïà¹ØÎĵµ£º

¼¸¸öjavaÀàµÄÇø±ð

JavaÃæÊÔÖУ¬×î³£±»ÈËÎʵ½µÄ¼¸¸öÎÊÌ⣺
1. java.util.*°üµÄUML½á¹¹Í¼¡£
2. VectorºÍArrayList¡¢LinkedListÇø±ð  Hashtable ºÍ HashMapÖ®¼äµÄÇø±ð
3. String¡¢StringBuffer£¬StringBuilderÖ®¼äÇø±ð¡£
--»Ø´ð--
1.
Collection
  |
  |_List
  |  |_LinkedList
  |  | ......

AndroidС֪ʶһ: ´ÓÃüÁîÐÐÆô¶¯JavaÓ¦ÓÃ&Ôö¼ÓJavaÓ¦ÓÃ


1.              
Ôö¼ÓJavaÓ¦ÓÃ
ÔÚandroid_2.1/packages/appsÔö¼Ó¸ÃÏîÄ¿£»
ÔÚbuild/target/product/generic.mkµÄPRODUCT_PACKAGESºóÃæÔö¼Ó¶ÔÓ¦°üµÄÃû×Ö¡£
 
1.1          
´ÓÃüÁîÐ ......

JavaÃæÊÔÌâÒ»(»ù´¡)

1. ÈçºÎµÃµ½JavaÓ¦ÓóÌÐòµÄ¿ÉÓÃÄڴ棿
´ð£ºÈçÏ´úÂëʵÏÖÈ¡µÃ×ܵÄÄÚ´æ´óСºÍ¿ÉÓÃÄÚ´æ´óС£¬²¢´òÓ¡µ½¿ØÖÆ̨ÉÏ
public class MemoryExp {
public static void main(String[] args) {
System.out.println("Total Memory"+Runtime.getRuntime().totalMemory());
System.out.println("Free Memory ......

javaÖÐstringÓëÆäËûÀàÐÍÖ®¼äµÄ»¥Ïàת»»

1.½«Int,Float,Double,Longת»»ÎªString
String s = ""+i;
String s = String.valueOf(i);
String s = Integer.toString(i);
µÚÒ»ÖÖ·½·¨£ºs = ""+i;   //»á²úÉúÁ½¸öString¶ÔÏó
µÚ¶þÖÖ·½·¨£ºs=String.valueOf(i); //Ö±½ÓʹÓÃStringÀàµÄ¾²Ì¬·½·¨£¬Ö»²úÉúÒ»¸ö¶ÔÏó
µÚÈýÖÖ·½·¨£ºÐ§ÂÊ×î¸ß£¿
2.½«Stringת»»ÎªIn ......

java ¶ÁÈ¡Ò»¸öexcel


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++) {
//»ñÈ¡Ö¸¶¨µ¥Ôª¸ñ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ