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

javaÎļþ¹ýÂËÆ÷µÄʹÓÃ

javaÎļþ¹ýÂËÆ÷µÄʹÓôúÂëÈçÏ£º
²âÊÔ´úÂ룺package file;
import java.io.File;
public class fileFilter {
 public static void main(String[] args) {
  File file = new File("d:\\");//ÉèÖÃÎļþ·¾¶
  for (File fileList : file.listFiles(new file.MyFileFilter())) {
   System.out.println(fileList.getName());
  }
 }
}
¹ýÂËÆ÷´úÂ룺
package file;
import java.io.File;
import java.io.FileFilter;
public class MyFileFilter implements FileFilter {
 //ʵÏÖFileFilterµÄ·½·¨
 public boolean accept(File arg0) {
  if (arg0.getName().endsWith(".class")) {
   return true;
  }
  return false;
 }
}


Ïà¹ØÎĵµ£º

java»ù´¡ÖªÊ¶ÈýÊ®¶þ¼Æ


      µÚÒ»£¬Ì¸Ì¸final£¬ finally£¬ finalizeµÄÇø±ð¡£
¡¡¡¡final ÓÃÓÚÉùÃ÷ÊôÐÔ£¬·½·¨ºÍÀ࣬·Ö±ð±íʾÊôÐÔ²»¿É±ä£¬·½·¨²»¿É¸²¸Ç£¬À಻¿É¼Ì³Ð¡£finallyÊÇÒì³£´¦ÀíÓï¾ä½á¹¹µÄÒ»²¿·Ö£¬±íʾ×ÜÊÇÖ´ÐС£finalizeÊÇObjectÀàµÄÒ»¸ö·½·¨£¬ÔÚÀ¬»øÊÕ¼¯Æ÷Ö´ÐеÄʱºò»áµ÷Óñ»»ØÊÕ¶ÔÏóµÄ´Ë·½·¨£¬¿ÉÒÔ¸²¸Ç ......

¡¶JavaÃæÏò¶ÔÏó±à³Ì¡·—JavaÖеļ¯ºÏ


1.¼¯ºÏµÄÌØµã£º
¶¼Î»ÓÚ java.util°üÖУ¬²»ÄÜ´æ·Å»ù±¾ÀàÐ͵ÄÊý¾Ý£¬¶øÖ»ÄÜ´æ·Å¶ÔÏóµÄÒýÓ㬲Ù×÷µÄÊýÄ¿¿ÉÒÔ²»¹Ì¶¨£¨ÀàËÆÓÚ¶¯Ì¬Êý×飩¡£
2.·ÖÀࣺ
ÓÐÈý¸öÀࣺ
a.Set(¼¯)£º¶ÔÏó²»°´Ìض¨·½Ê½ÅÅÐò£¬Ã»ÓÐÖØ¸´ÔªËØ¡£Õâ¸öÓëÊýѧÖеļ¯ºÏ¸ÅÄî×îÏàËÆ¡£
b.List(Áбí)£º°´ÕÕË÷ÒýλÖÃÅÅÐò£¬¿ÉÒÔÓÐÖØ¸´ÔªËØ£¬ÔÊÐí°´ÕÕ¶ÔÏóÔÚ¼¯ºÏÖеÄË ......

javaÑéÖ¤Âë»ã×Ü

1.Éú³ÉgifͼƬ¸ñʽµÄ
package com.cssweb.common.util;
import java.io.*;
import java.util.*;
import com.sun.image.codec.jpeg.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.awt.*;
import java.awt.image.*;
/*
* ¹¦ÄÜ£ºµ÷ÓÃAuthServlet¿ÉÒÔÉú³ÉÒ»¸öÑéÖ¤ÂëͼƬ,ͼƬµÄ¿í¶ÈºÍ¸ß¶È¿ÉÒ ......

ËÄÄêjavaÑз¢ ѰǶÈëʽְ룬´ýÓö2K¼´¿É£¬±±¾©

±¾È˾ãËÄÄêÑз¢¾­Ñ飨javaµÄ£©
Ë­¸øÎÒÍÆ¼ö·ÝǶÈëʽcְ룬cÓïÑÔһֱûÂäÏ£¬Ñ§µÄ»¹ÐС£¡£¡£ ¹¤×Ê¿ªÎÒ2k¾ÍÐУ¡
ֻΪ³É¹¦´òÈëǶÈëʽÊг¡¡£¡£¡£¸ø¸ö»ú»á°É¡£¡£
ÎÒÕæµÄÊÇÌ«ÏëºÍÄãÃÇ×öͬÐÐÀ²£¡
ÓÐÒâÏòµÄ¿ÉÒÔÁªÏµÎÒ¡£¡£ ÎÒ²»Ìô´ýÓö£¬¶Ô¹¤×÷¾ÍÒ»¸öÒªÇó£¬Ç¶Èëʽ¿ª·¢¡£¡£¡£ ÎÒÓе쬾ÍÊÇ4ÄêµÄjavaÑз¢¾­ÑéºÍc»ù´¡¡£¡£¡£ ÌáÇ ......

Java ¸´Ï°±Ê¼Ç_µÚ1Ìì

 
·½·¨µÄÖØÔØ
£ºÍ¬Ò»¸öÀàÀïÃæ·½·¨µÄÃû×ÖÏàͬ£¬·½·¨µÄ²ÎÊýÏÖ÷ÒªÊDzÎÊýÀàÐÍ£¬²ÎÊý¸öÊý£©
²»Í¬
,
·µ»ØÀàÐÍ¿ÉÄܲ»Í¬¡£
      
  
        
ÖØÔØ·½·¨¿ÉÒÔ¾ßÓв»Í¬µÄ·µ»ØÀàÐÍ£¬µ«·µ»ØÀàÐͱ¾Éí²»×ãÒÔÇø·Ö·½·¨µÄÁ½¸ö°æ
±¾¡£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ