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

java¶ÔÎļþµÄ²Ù×÷

1Áгö´ÅÅÌ/Îļþ¼ÐÄÚµÄÎļþ
import java.io.File;
import java.io.IOException;
 
 
public class Test {
 
    public static void main(String[] args) throws IOException{
       // TODO Auto-generated method stub
      File f = new File("D:");//´ÅÅÌ
//File f = new File("D:\\µçÓ°");//Îļþ¼Ð
      File lf[] = f.listFiles();
      for(int i = 0;i<lf.length;i++){
      System.out.println(lf[i]);
      }
    }
}
 
2¶ÔÎļþµÄ²Ù×÷
import java.io.File;
import java.io.IOException;
 
 
public class Test {
 
    public static void main(String[] args) throws IOException{
       // TODO Auto-generated method stub
      File f = new File("D:\\java.doc");
      if(!f.exists()){  //ÅжÏÊÇ·ñ¸ÃÎļþ´æÔÚ
      f.createNewFile();//Èç¹û²»´æÔھʹ´½¨
      }
     
      System.out.println("ÎļþµÄ·¾¶ÊÇ£º "+f.getAbsolutePath());
      System.out.println("ÎļþÊÇ·ñ¿Éд£º "+f.canWrite());     
      System.out.println("ÎļþÊÇÒÑɾ³ý£º "+f.delete()); 
    }
}
 
3¶ÔĿ¼µÄ²Ù×÷
import java.io.File;
import java.io.IOException;
 
 
public class Test {
    public static void main(String[] args) throws IOException{
       // TODO Auto-generated method stub
      File dir= new File("D:\\java");
      if(!dir.exists()){  //ÅжÏĿ¼ÊÇ·ñ´æÔÚ
     dir.mkdir();//Èç¹û²»´æÔھʹ´½¨
      }
  &


Ïà¹ØÎĵµ£º

Java±à³Ì µÄ¶¯Ì¬ÐÔ£¬µÚ 2²¿·Ö: ÒýÈë·´Éä

·´ÉäʹÄúµÄ³ÌÐò´úÂëÄܹ»½ÓÈë×°ÔØµ½JVMÖеÄÀàµÄÄÚ²¿ÐÅÏ¢£¬ÔÊÐíÄú±àдÓëÖ´ÐÐʱ£¬¶ø²»ÊÇÔ´´úÂëÖÐÑ¡¶¨µÄÀàЭ×÷µÄ´úÂë¡£Õâʹ·´Éä³É
Ϊ¹¹½¨Áé»îµÄÓ¦ÓõÄÖ÷Òª¹¤¾ß¡£µ«Ðè×¢ÒâµÄÊÇ --Èç¹ûʹÓò»µ±£¬·´ÉäµÄ³É±¾ºÜ¸ß¡£ÔÚJavaƽ̨ϵÁеĵÚ2²¿·ÖÖУ¬Èí¼þ¹ËÎÊDennis
Sosnoski½éÉÜÁËÈçºÎʹÓ÷´É䣬ÒÔ¼°Ä³Ð©Ïà¹ØµÄ³É±¾¡£Äú»¹½«ÕÒµ½JavaRef ......

Java×¢Ê͹淶

Java×¢Ê͹淶
¶¨ÒåÕâ¸ö¹æ·¶µÄÄ¿µÄÊÇÈÃÏîÄ¿ÖÐËùÓеÄÎĵµ¶¼¿´ÆðÀ´ÏñÒ»¸öÈËдµÄ£¬Ôö¼Ó¿É¶ÁÐÔ£¬¼õÉÙÏîÄ¿×éÖÐÒòΪ»»È˶ø´øÀ´µÄËðʧ¡££¨ÕâЩ¹æ·¶²¢²»ÊÇÒ»¶¨Òª¾ø¶Ô×ñÊØ£¬µ«ÊÇÒ»¶¨ÒªÈóÌÐòÓÐÁ¼ºÃµÄ¿É¶ÁÐÔ£©¡£
Java µÄÓï·¨Óë C++ ¼°ÎªÏàËÆ£¬ÄÇô£¬ÄãÖªµÀ Java µÄ×¢ÊÍÓм¸ÖÖÂð£¿ÊÇÁ½ÖÖ£¿ ¡¡¡¡
// ×¢ÊÍÒ»ÐС¡¡¡
/* ...... */ ×¢Ê ......

Java ðÅÝÅÅÐò

/**
* ½»»»ÅÅÐò-ðÅÝÅÅÐò£¬ºËÐÄ˼Ïë ÒÔ´óСΪÒÀ¾Ý½»»»
*
* */
public void bubbleSort(double[] a){
//½«Òª½øÐбȽϵÄÊý´óµÄ¾¡Á¿ÍùºóÅÅ£¬Ã¿´ÎÑ­»·°Ñ×î´óµÄÅÅÔÚÒªÅÅÐòÊý×éµÄĩλ¡£
boolean hasSwap = true;
for(int i = 1; i < a.length&& hasSwap; i ++){//Ñ­»·µÄ´ÎÊý

hasSwap = ......

java ÐòÁл¯Óë³Ö¾Ã»¯

Ê×ÏÈҪ˵µÄÊÇ,HibernateÖÐORMÀï¶ÔÓ¦µÄÓ³ÉäÎļþBEAN,±ØÐëʵÏÖÐòÁл¯.ÒòΪBEANÀïµÄÊý¾ÝÐèÒª´æÈëÊý¾Ý¿â(Ҫת»¯Îª¶þ½øÖƱ£´æ),½øÐдæÈ¡¹¤×÷.
        JAVAÀàµÄÊý¾Ý ,Èç¹ûÒª½øÐÐÏà¹ØµÄ´æ´¢¹¤×÷(ÈçдÎļþ,ÍøÂç´«Êä,дÊý¾Ý¿âµÈ),ÄÇôÕâ¸öÊý¾ÝµÄÀà ¾Í±ØÐëʵÏÖÐòÁл¯½Ó¿Ú (java.io.Serializable ......

JavaÎļþÏÂÔØ



JavaÎļþÏÂÔØµÄ¼¸ÖÖ·½Ê½
< type="text/javascript">
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = cli ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ