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

java ²é¿´Îļþ¼ÐÏÂÃæËùÓÐÎļþÒÔ¼°Îļþ¼Ð

import java.io.File;
import java.util.Date;
import java.util.Iterator;
import java.util.Vector;
import java.text.SimpleDateFormat;
public class FileViewer {
  File myDir;
  File[] contents;
  Vector vectorList;
  Iterator currentFileView;
  File currentFile;
  String path;
  public FileViewer() {
    path = new String("");
    vectorList = new Vector();
  }
  public FileViewer(String path) {
    this.path = path;
    vectorList = new Vector();
  }
  /**
   * ÉèÖÃä¯ÀÀµÄ·¾¶
   */
  public void setPath(String path) {
    this.path = path;
  }
  /***
   * ·µ»Øµ±Ç°Ä¿Â¼Â·¾¶
   */
  public String getDirectory() {
    return myDir.getPath();
  }
  /**
   * Ë¢ÐÂÁбí
   */
  public void refreshList() {
    if (this.path.equals("")) {
      path = "c:\\";
    }
    myDir = new File(path);
    vectorList.clear();
    contents = myDir.listFiles();
    //ÖØÐÂ×°Èë·¾¶ÏÂÎļþ
    for (int i = 0; i < contents.length; i++) {
      vectorList.add(contents[i]);
    }
    currentFileView = vectorList.iterator();
  }
  /**
   * Òƶ¯µ±Ç°Îļþ¼¯ºÏµÄÖ¸ÕëÖ¸µ½ÏÂÒ»¸öÌõÄ¿
   * @return ³É¹¦·µ»Øtrue,·ñÔòfalse
   */
  public boolean nextFile() {
    while (currentFileView.hasNext()) {
      currentFile = (File) currentFileView.next();
      return true;
    }
    return false;
  }
  /**
   * ·µ»Øµ±Ç°Ö¸ÏòµÄÎļþ¶ÔÏóµÄÎļþÃû³Æ
   */
  public String


Ïà¹ØÎĵµ£º

JavaÓïÑÔ»îµÄjdk¡¢jreºÍ²Ù×÷ϵͳ°æ±¾µÈÐÅÏ¢

      System.out.println(System.getProperty("java.version")); //java°æ±¾ºÅ
System.out.println(System.getProperty("java.vendor")); //JavaÌṩÉÌÃû³Æ
System.out.println(System.getProperty("java.vendor.url")); //JavaÌṩÉÌÍøÕ¾
System.out.println( ......

javaÖÐvolatile¹Ø¼ü×ÖµÄÓ÷¨ºÍÔ­Àí

javaÖÐvolatile¹Ø¼ü×ÖµÄÓ÷¨ºÍÔ­Àí
±¾ÎÄÀ´×ÔCSDN²©¿Í£ºhttp://blog.csdn.net/litao1102/archive/2009/10/07/4639155.aspx
 ÎÒÃÇÖªµÀ£¬ÔÚJavaÖÐÉèÖñäÁ¿ÖµµÄ²Ù×÷£¬³ýÁËlongºÍdoubleÀàÐ͵ıäÁ¿ÍⶼÊÇÔ­×Ó²Ù×÷£¬Ò²¾ÍÊÇ˵£¬¶ÔÓÚ±äÁ¿ÖµµÄ¼òµ¥¶Áд²Ù×÷ûÓбØÒª½øÐÐͬ²½¡£
 
ÕâÔÚJVM 1.2֮ǰ£¬JavaµÄÄÚ´æÄ£ÐÍʵÏÖ× ......

Java±ÊÊÔÌ⣺HashMapºÍHashTableµÄÇø±ð

½ñÌì²Î¼ÓÍøÁú±ÊÊÔ£¬Ò»ÌâÊǹØÓÚHashMapºÍHashTableµÄÇø±ð£¬´ðµÄ²»ºÃ£¬»ØÀ´¸Ï½ôѧϰѧϰ....
HashTableµÄÓ¦Ó÷dz£¹ã·º£¬HashMapÊÇпò¼ÜÖÐÓÃÀ´´úÌæHashTableµÄÀ࣬Ҳ¾ÍÊÇ˵½¨ÒéʹÓÃHashMap£¬²»ÒªÊ¹ÓÃHashTable¡£¿ÉÄÜÄã¾õµÃHashTableºÜºÃÓã¬ÎªÊ²Ã´²»ÓÃÄØ£¿ÕâÀï¼òµ¥·ÖÎöËûÃǵÄÇø±ð¡£ 
1.HashTableµÄ·½·¨ÊÇͬ²½µÄ£¬HashM ......

JavaÖи÷ÀàCache»úÖÆʵÏÖ½â¾ö·½°¸

ÎÄÕÂÀ´Ô´£ºhttp://java.chinaitlab.com/base/808164.html
ÔÚJavaÖУ¬²»Í¬µÄÀ඼ÓÐ×Ô¼ºµ¥¶ÀµÄCache»úÖÆ£¬ÊµÏֵķ½·¨Ò²¿ÉÄÜÓÐËù²»Í¬£¬ÎÄÕÂÁоÙÁËJavaÖг£¼ûµÄ¸÷ÀàCache»úÖƵÄʵÏÖ·½·¨£¬Í¬Ê±½øÐÐÁË×ۺϵıȽϡ£
¡¡¡¡OSCache
¡¡¡¡OSCacheÊǸöÒ»¸ö¹ã·º²ÉÓõĸßÐÔÄܵÄJava EE»º´æ¿ò¼Ü£¬OSCacheÄÜÓÃÓÚÈκÎJavaÓ¦ÓóÌÐòµÄÆÕͨµÄ» ......

ÈçºÎÓÃÃüÁîÐÐÔËÐÐjava³ÌÐò¼°ÊäÈëmainº¯Êý²ÎÊýµÄÊäÈë

Ç°Ì᣺JDKÔÚ»·¾³±äÁ¿ÀïÓÐÅäÖà 1.Ê×ÏȽ¨¸ö¹¤³ÌTest£¨¼ÙÈç·ÅÓÚD:\java£©½«srcĿ¼ÏµÄÎļþ¿½±´µ½classesĿ¼Ï 2.ÔËÐÐÀïÊäÈëcmd->»Ø³µ 3.ÊäÈëD:->»Ø³µ 4.ÊäÈëcd java»Ø³µ(cdδ´ò¿ªÎļþ¼Ð) 5.ÊäÈëcd test->»Ø³µ 6.ÊäÈëcd classes->»Ø³µ 7.ÊäÈëdir->»Ø³µ£¨dirΪÏÔʾ¸ÃĿ¼ÏµÄËùÓÐÎļþ£© 8.¶Ôÿ¸ö.javaÎ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ