Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ÀíÂÛÓëʵ¼ù: ÓÃÈõÒýÓöÂסÄÚ´æй© 1

ËäÈ»Óà Java™ ÓïÑÔ±àдµÄ³ÌÐòÔÚÀíÂÛÉÏÊDz»»á³öÏÖ“ÄÚ´æй©”µÄ£¬µ«ÊÇÓÐʱ¶ÔÏóÔÚ²»ÔÙ×÷Ϊ³ÌÐòµÄÂß¼­×´Ì¬µÄÒ»²¿·ÖÖ®ºóÈÔÈ»²»±»À¬»øÊÕ¼¯¡£±¾Ô£¬¸ºÔð±£ÕÏÓ¦ÓóÌÐò½¡¿µµÄ¹¤³Ìʦ Brian Goetz ̽ÌÖÁËÎÞÒâʶµÄ¶ÔÏó±£ÁôµÄ³£¼ûÔ­Òò£¬²¢Õ¹Ê¾ÁËÈçºÎÓÃÈõÒýÓöÂסй©¡£
ÒªÈÃÀ¬»øÊÕ¼¯£¨GC£©»ØÊÕ³ÌÐò²»ÔÙʹÓõĶÔÏ󣬶 ......

javaÁ·Ï°Ì⣬ºÜÈõÖÇ£¬µ«±Ï¾¹¾ø´ó²¿·ÖÊÇ×Ô¼ºÐ´µÄ

import java.io.*;
public class CheckVirusFile

   int virusCount=0,del_count=0,spe_count=0,nameCount=0;
   //ÓõݹéµÄ·½·¨¼ì²éFileÀàÐ͵IJÎÊýÊÇÎļþ»¹ÊÇĿ¼
   public void judgeDir(File virFile)
   {   
  if(!virFile.isDir ......

Java ÀíÂÛºÍʵ¼ù: ÓÃÈíÒýÓÃ×èÖ¹ÄÚ´æй© 2

ÔÚ Java ÀíÂÛºÍʵ¼ù µÄ Ç°Ò»ÆÚÎÄÕ ÖУ¬Java™ Çå½à¹¤³Ìʦ Brian Goetz ̽¾¿ÁËÈõÒýÓã¨weak references£©£¬ËüÈÃÄú¾¯¸æÀ¬»øÊÕ¼¯Æ÷£¬ÄúÏëҪά»¤Ò»¸ö¶ÔÏóµÄÒýÓ㬶ø²»»á×èÖ¹¸Ã¶ÔÏó±»À¬»øÊÕ¼¯¡£ÔÚ±¾ÆÚÎÄÕÂÖУ¬Ëû½«½âÊÍ Reference ¶ÔÏóµÄÁíÍâÒ»ÖÖÐÎʽ£¬¼´ÈíÒýÓã¨soft references£©£¬ÓÃÓÚ°ïÖúÀ¬»øÊÕ¼¯Æ÷¹ÜÀíÄÚ´æʹÓúÍÏû³ýÇ ......

Java³ÌÐòÔ±µÄ֪ʶ¼Ü¹¹Ç³Îö

×÷ΪJava³ÌÐòÔ±À´Ëµ£¬×îÍ´¿àµÄÊÂÇéĪ¹ýÓÚ¿ÉÒÔÑ¡ÔñµÄ·¶Î§Ì«¹ã£¬¿ÉÒÔ¶ÁµÄÊéÌ«¶à£¬ÍùÍùÈÝÒ×ÎÞËùÊÊ´Ó¡£ÎÒÏë¾ÍÎÒ×Ô¼º¶Á¹ýµÄ¼¼ÊõÊé¼®ÖÐÌôÑ¡³öÀ´Ò»Ð©£¬
°´ÕÕѧϰµÄÏȺó˳Ðò£¬ÍƼö¸ø´ó¼Ò£¬ÌرðÊÇÄÇЩÏë²»¶ÏÌá¸ß×Ô¼º¼¼ÊõˮƽµÄJava³ÌÐòÔ±ÃÇ¡£
Ò»¡¢Java±à³ÌÈëÃÅÀà
¶ÔÓÚûÓÐJava±à³Ì¾­ÑéµÄJava³ÌÐòÔ±ÒªÈëÃÅ£¬Ëæ±ã¶ÁʲôÈëÃÅÊé¼®¶¼Ò» ......

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

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