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

ÓÉJava toy programme µÃ³öµÄ¾­Ñé¼°½Ìѵ

ѧϰJava´ó¸ÅÒ»¸öÔÂÁË£¬ÓÉÓÚÒÔÇ°ÓÐc/c++»ù´¡£¬ËùÒÔÔÚJ2SE²¿·ÖµÄѧϰÊDZȽϿìµÄ£¬½ñÌìÔÚÂÛ̳¿´µ½Ò»¸öÍøÓѵÄÇóÖúÌû£¬Òª½«Ó²ÅÌÉÏÁ½¸öÎļþºÏ²¢ÎªÒ»¸ö²¢É¾³ýÔ­Îļþ£¬ÓÚÊDZãдÁ˲âÊÔ³ÌÐò¡£ºóÀ´ÔÚɾ³ýÎļþʱ£¬ÓÉÓÚûÓаѶµ½ÎļþÉϵÄÊä³öÁ÷¹Ø±Õ£¬µ¼ÖÂÔõôҲÎÞ·¨É¾³ý¡£¶øÇÒÒ»Ö±²é²»³öÔ­Òò£¬ºóÀ´ÒÔΪÊÇdelete·½·¨Ö»ÄÜɾ³ý¿ÕÎļþ£¬Ò»google£¬ÔÚ¿´Ìû¹ý³ÌÖÐͻȻÒâʶµ½×Ô¼ºµÄÊä³öÁ÷û¹Ø±Õ£¬Ð޸ijÌÐòºó£¬Õý³£ÁË¡£´ÓÖУ¬Ìå»áµ½Ð´³ÌÐòºÃÏ°¹ßÕæµÄÊǺÜÖØÒªµÄ¡£¼ÌÐø³É³¤ing¡£¡£¡£¡£¡£¡£¡£¡£
java code
import java.io.*;
public class HandleFile {
 public static void main(String[] args) throws Exception {
  
  if(args.length == 0)  return ;
  else{
   File[] f = new File[args.length];
   File objectFile = new File("G:\\object.txt");
   BufferedReader buf = null;                       
   BufferedWriter bw = new BufferedWriter(new FileWriter(objectFile));
   String line = null;
   for(int i=0; i<args.length; i++) {
    f[i] = new File(args[i]);
    System.out.println(f[i]);
    buf = new BufferedReader(new FileReader(f[i]));
    line = buf.readLine();
    while(line != null) {
     bw.write(line);
     bw.flush();
     bw.newLine();
     line = buf.readLine();
     if(line == null) {
      buf.close();
      System.out.println("µÚ" + i +"¸öÎļþÍê±Ï");
      if(f[i].delete()) System.out.println("ÒÑɾ³ý");
     }
    }
   }
  }
 }
}


Ïà¹ØÎĵµ£º

JavaÖеÄpublic¡¢ protected¡¢ default¡¢ private

ÔÚJavaÖУ¬¶¨Ò庯Êý»òÕß±äÁ¿µÄʱºò£¬¶Ôº¯Êý¡¢±äÁ¿¶¼ÓÐÒ»¸ö·ÃÎÊȨÏÞÎÊÌâ¡£
¶ÔÓÚº¯ÊýÀ´Ëµ£¬±ÈÈ磺
public class test {
  public static void main(String[] args) {
  // TODO Auto-generated method stub
 }
 public void apublic() {
  //public º¯Êý
 }
 pri ......

DWRÖÐJava·½·¨µÄ²ÎÊý¼°·µ»ØÖµÉÏƪ

DWRÊÇÒ»¸ö¿ò¼Ü£¬¼òµ¥µÄ˵¾ÍÊÇÄܹ»ÔÚjavascriptÖ±½Óµ÷ÓÃjava·½·¨£¬¶ø²»±Øȥдһ´ó¶ÑµÄjavascript´úÂë¡£ËüµÄʵÏÖÊÇ»ùÓÚajaxµÄ£¬¿ÉÒÔʵÏÖÎÞË¢ÐÂЧ¹û¡£
ÍøÉÏÓв»ÉÙDWRµÄÀý×Ó£¬µ«´ó¶¼Ö»ÊÇijÖÖ·½·¨µÄµ÷Ó㬱¾ÎÄÖ»ÔÚʹÓòãÃæÉϽéÉÜDWR£¬²¢²»Éæ¸ü¶àµÄ¼¼ÊõÓëÉè¼Æ£¬ÆäÄ¿µÄÊÇÈóõѧÕßÄܹ»ºÜ¿ìµÄѧ»á¸÷ÖÖjava·½·¨ÔÚjavascriptÖÐÊÇÈçºÎµ ......

javaÖеĶ¯Ì¬´úÀí

   JavaÔÚJDK1.3Ö®ºó¼ÓÈëÁË¿ÉЭÖú¿ª·¢¶¯Ì¬´úÀí¹¦ÄܵÄAPI.ʹÓö¯Ì¬´úÀí£¬¿ÉÒÔʹһ¸ö´¦ÀíÕߣ¨´úÀí£©·þÎñÓÚ¸÷¸ö¶ÔÏó¡£´´½¨Ò»¸ö¶¯Ì¬´úÀíÀàÖ»ÐèʵÏÖjava.lang.reflect.InvocationHandler½Ó¿Ú¡£
  ÏÂÃæ´´½¨Ò»¸ö´¦ÀíÈÕÖ¾µÄ¶¯Ì¬´úÀíÀàLogHandlerÈ¥´úÀíHelloSpeakerÀà
   Ê×ÏÈ´´½¨HelloSpeakerµÄ½Ó¿Ú
pa ......

java»·¾³±äÁ¿ÅäÖÃ[ÕûÀí]

JDKµÄ°²×°Â·¾¶
-------------
±äÁ¿Ãû JAVA_HOME
±äÁ¿ÖµÊ¾Àý D:\Program Files\Java\jdk1.6.0;
ËÑË÷ÀàµÄĿ¼
------------
±äÁ¿Ãû CLASSPATH
±äÁ¿ÖµÊ¾Àý D:\Program Files\Java\jdk1.6.0\lib\tools.jar;
    D:\Program Files\Java\jdk1.6.0\lib\dt.jar;
JdkµÄbinĿ¼
------------
±äÁ¿Ãû PATH(Ò ......

JAVAËÄÖÖ»ù±¾ÅÅÐòµÄ×ܽá

JAVAËÄÖÖ»ù±¾ÅÅÐò,°üÀ¨Ã°ÅÝ·¨,²åÈë·¨,Ñ¡Ôñ·¨,SHELLÅÅÐò·¨.ÆäÖÐÑ¡Ôñ·¨ÊÇðÅÝ·¨µÄ¸Ä½ø,SHELLÅÅÐò·¨ÊÇ ²åÈë·¨µÄ¸Ä½ø.ËùÒÔ´Ó¸ù±¾ÉÏÀ´Ëµ¿ÉÒÔ¹éÄÉΪÁ½ÖÖ²»Í¬µÄÅÅÐò·½·¨:¼´:²åÈë·¨£¦Ã°ÅÝ·¨
Ò» ²åÈë·¨:±éÀúÅÅÐò¼¯ºÏ£¬Ã¿µ½Ò»¸öÔªËØʱ£¬¶¼Òª½«Õâ¸öÔªËØÓëËùÓÐËü֮ǰµÄÔªËرéÀú±È½ÏÒ»±é£¬È÷ûºÏÅÅÐò˳ÐòµÄÔªËØ°¤¸öÒƶ¯µ½µ±Ç°·¶Î§ÄÚËü×î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ