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

javaÃæÊÔÌâ2

 18.×öÒ»¸öµ¥×ÓģʽµÄÀֻ࣬¼ÓÔØÒ»´ÎÊôÐÔÎļþ
package com.softeem.demo;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
/**
*@authorleno
*µ¥×Óģʽ£¬±£Ö¤ÔÚÕû¸öÓ¦ÓÃÆÚ¼äÖ»¼ÓÔØÒ»´ÎÅäÖÃÊôÐÔÎļþ
*/
publicclass Singleton {
    privatestatic Singleton instance;
    privatestaticfinal String CONFIG_FILE_PATH = "E:\\config.properties";
    private Properties config;
    private Singleton()
    {
      config = new Properties();
      InputStream is;
      try {
          is = new FileInputStream(CONFIG_FILE_PATH);
          config.load(is);
          is.close();
      } catch (FileNotFoundException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
    }
    publicstatic Singleton getInstance()
    {
      if(instance==null)
      {
          instance = new Singleton();
      }
      returninstance;
    }
    public Properties getConfig() {
      returnconfig;
    }
    publicvoid setConfig(Properties config) {
      this.config = config;
    }
   
   
}
l    J2SE
19.¿½±´Ò»¸öĿ¼(Îļþ)µ½Ö¸¶¨Â·¾¶
/**
    *¿½±´Ò»¸öĿ¼»òÕßÎļþµ½Ö¸¶¨Â·¾¶ÏÂ
    *@paramsource
    *@pa


Ïà¹ØÎĵµ£º

javaÈëÃÅ

 Javaѧϰ´ÓÈëÃŵ½¾«Í¨ 
Ò»¡¢ JDK (Java Development Kit) 
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

Java »ù´¡³£Óù¦ÄÜÓï¾ä

 
2009-08-18 15:49
////ÉèÖþÓÖУ¨×¢Ò⣬ҪÔÚÉèÖô°Ìå´óСÏÂÃæÉèÖøþ䣩
this.setLocationRelativeTo(null);
********************
String[] kecheng = {"Java","Ó¢Óï","Êýѧ"};
   JComboBox jComboBox3 = new JComboBox(kecheng);  
JComboBox jComboBox2 = new JComboBox();
******* ......

JAVA»ù´¡ÃæÊÔÌâ4

96¡¢JAVAÓïÑÔÈçºÎ½øÐÐÒì³£´¦Àí£¬¹Ø¼ü×Ö£ºthrows,throw,try,catch,finally·Ö±ð´ú±íʲôÒâÒ壿ÔÚtry¿éÖпÉÒÔÅ׳öÒì³£Âð£¿
Javaͨ¹ýÃæÏò¶ÔÏóµÄ·½·¨½øÐÐÒì³£´¦Àí£¬°Ñ¸÷ÖÖ²»Í¬µÄÒì³£½øÐзÖÀ࣬²¢ÌṩÁËÁ¼ºÃµÄ½Ó¿Ú¡£ÔÚJavaÖУ¬Ã¿¸öÒì³£¶¼ÊÇÒ»¸ö¶ÔÏó£¬ËüÊÇThrowableÀà»òÆäËü×ÓÀàµÄʵÀý¡£µ±Ò»¸ö·½·¨³öÏÖÒì³£ºó±ãÅ׳öÒ»¸öÒì³£¶ÔÏó£¬ ......

Java£ºÆËË·ÃÔÀëµÄString

 ¡¡¡¡JavaÄÚ´æ·ÖÅä:
¡¡¡¡1. ¼Ä´æÆ÷£ºÎÒÃÇÔÚ³ÌÐòÖÐÎÞ·¨¿ØÖÆ£»
¡¡¡¡2. Õ»£º´æ·Å»ù±¾ÀàÐ͵ÄÊý¾ÝºÍ¶ÔÏóµÄÒýÓ㬵«¶ÔÏó±¾Éí²»´æ·ÅÔÚÕ»ÖУ¬¶ø
¡¡¡¡ÊÇ´æ·ÅÔÚ¶ÑÖУ»
¡¡¡¡3. ¶Ñ£º´æ·ÅÓÃnew²úÉúµÄÊý¾Ý£»
¡¡¡¡4. ¾²Ì¬Óò£º´æ·ÅÔÚ¶ÔÏóÖÐÓÃstatic¶¨ÒåµÄ¾²Ì¬³ÉÔ±£»
¡¡¡¡5. ³£Á¿³Ø£º´æ·Å³£Á¿£»
¡¡¡¡6. ·ÇRAM´æ´¢£ºÓ²Å̵ÈÓÀ¾Ã´æ´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ