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

java ioÕýÈ·¶ÁÈ¡

дÈë
 public static void Writer(String value) {
         try{
          File file2 = new File("F:\\countDB.txt");
          if(!file2.exists()){
            file2.createNewFile();
          }
          FileOutputStream writer = new FileOutputStream(file2,true);
          OutputStreamWriter rp = new OutputStreamWriter(writer,"GBK");
          BufferedWriter tmpBR = new BufferedWriter(rp,1024*1024);
          tmpBR.write(value+"\r\n");
          tmpBR.flush();
          tmpBR.close();
          rp.flush();
          rp.close();
          writer.flush();
          writer.close();
         }catch(Exception ex){
          //ex.fillInStackTrace();
         }
         
     }
²éѯ
File file = new File("E:\\DB.txt");
       FileInputStream read = new FileInputStream(file);
       InputStreamReader rp = new InputStreamReader(read,"GBK");
       BufferedReader tmpBR = new BufferedReader(rp,1024*1024);
       String tmpLine = tmpBR.readLine();
      
       while (tmpLine != null) {
    &n


Ïà¹ØÎĵµ£º

java µ÷ÓÃÃüÁî ±¸·ÝmysqlÊý¾Ý¿â

 ´úÂëÈçÏ£º
  1  String command  =   " cmd /c C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqldump -h localhost -u root -p aijia > E:/aijia.dmp " ;
  2      try    {
  3     Process process& ......

java µ÷ÓÃmysql¿Í»§¶Ëµ¼È룬µ¼³öÊý¾Ý

 ×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë 
/**  
 * µ¼ÈëÊý¾Ý  
  * @param  ½Å±¾µÄµØÖ·ºÍÃû³Æ  
 * @return ÊÇ·ñ³ ......

JavaѧϰÐĵã¨×ª×ÔÕŹú±¦£©


1.    Êý×éÓÐûÓÐlength()Õâ¸ö·½·¨? StringÓÐûÓÐlength()Õâ¸ö·½·¨£¿
        ´ð£ºÊý×éûÓÐlength()Õâ¸ö·½·¨£¬ÓÐlengthµÄÊôÐÔ¡£
        StringÓÐlength()Õâ¸ö·½·¨¡£
2.     String s = new String("xyz") ......

Javaϸ½Ú£¨2£©


11   Ò»¸öÔ´³ÌÐòÎı¾ÎļþÒ²¿ÉÒÔº¬Óжà¸öÀ࣬µ«Ã¿¸öÎļþÖ»ÄÜÓÐÒ»¸ö¹«¹²Àà¡£
12   mainÊÇËùÓÐJavaÓ¦ÓóÌÐòÖ´ÐеÄÈë¿Ú£¬µ«²»ÊÇJavaСӦÓóÌÐòµÄÈë¿Ú¡£
        mainµÄÊôÐÔ±ØÐëÊÇpublic static void¡£
13   ÊýÖµÀàÐͼäµÄÇ¿Èõ¹ØÏµ
......

java½âÎöpropertiesµÄ·½·¨

1¡£Ê¹ÓÃjava.util.PropertiesÀàµÄload()·½·¨
ʾÀý£º InputStream in = lnew BufferedInputStream(new FileInputStream(name));
Properties p = new Properties();
p.load(in);
2¡£Ê¹ÓÃjava.util.ResourceBundleÀàµÄgetBundle()·½·¨
ʾÀý£º ResourceBundle rb = ResourceBundle.getBundle(name, Locale.getDefault()); ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ