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¼¯ºÏ¿ò¼Ü×öÁËÒ»¸ö¸ÅÀ¨ÐԵĽâ˵£¬Ä¿µÄÊǶÔJava¼¯ºÏ¿ò¼ÜÌåϵÓиö×ÜÌåÈÏʶ£¬Èç¹ûÄãÏëѧϰ¾ßÌåµÄ½Ó¿ÚºÍÀàµÄʹÓ÷½·¨£¬Çë²Î¿´Java APIÎĵµ¡£
Ò»¡¢¸ÅÊö
Êý¾Ý½á¹¹¶Ô³ÌÐòÉè¼ÆÓÐ×ÅÉîÔ¶µÄÓ°Ï죬ÔÚÃæÏò¹ý³ÌµÄCÓïÑÔÖУ¬Êý¾Ý¿â½á¹¹ÓÃstructÀ´ÃèÊö£¬¶øÔÚÃæÏò¶ÔÏóµÄ±à³ÌÖУ¬Êý¾Ý½á¹¹ÊÇÓÃÀàÀ´ÃèÊöµÄ£¬²¢ÇÒ°üº¬ÓжԸÃÊ ......
¶ÔÏóÖ»ÄÜ´æÔÚÓÚÄÚ´æÖÐ £¬¶øÄÚ´æÖв»ÄÜÓÀ¾Ã±£´æÊý¾Ý¡£Èç¹ûÒªÓÀ¾Ã±£´æ¶ÔÏóµÄ״̬£¬ÐèÒª½øÐжÔÏóµÄ³Ö¾Ã»¯£¬¼´°Ñ¶ÔÏó´æ´¢µ½×¨ÃŵÄÊý¾Ý´æ´¢¿âÖРĿǰ£¬¹ØÏµÊý¾Ý¿âȽȽÊÇʹÓÃ×î¹ã·ºµÄÊý¾Ý´æ´¢¿â¡£¹ØÏµÊý¾Ý¿âÖдæ·ÅµÄÊǹØÏµÊý¾Ý£¬ËüÊÇ·ÇÃæÏò¶ÔÏóµÄ¡£
³Ö¾Ã»¯Êǽ«JavaÐéÄâ»ú¶ÔÏó³Ö¾Ã±£´æ£¬¶ø²»Êǽ«Êý¾Ý¿âÓ³ÉäΪ¶ÔÏó£¬Í¨³£Êý¾ÝµÄ´æ´¢ ......
javaµÄ·¾¶ÈÃÐí¶àÈË£¬ÌرðÊdzõѧÕ߸е½ÃÔ»ó£¬ÎÒÕâÀïÔÙ½âÊÍһϡ£ÎÒÃÇ·Ö2¸ö½×¶Î£¬1ÊDZàÒë½×¶Î£¬2ÊÇÔËÐн׶Ρ£
Ò»¡¢±àÒë½×¶Î
Õâ¸öʱºò£¬ÎÒÃÇÒªÌṩ¸ø±àÒëÆ÷µÄÓÐ2¸ö·¾¶²ÎÊý£¬µÚÒ»¸öÊÇÔ´´úÂëÔÚÄÄÀҲ¾ÍÊÇ sourcepath,µÚ¶þ¸ö¾ÍÊÇÒÀÀµµÄÀàÔÚÄÄÀҲ¾ÍÊÇ classpath
ÎÒÃÇ¿´Ò»¸öÀý×Ó
d:\temp\TestCP\d1\p1\Clas ......
transientÊÇJavaÓïÑԵĹؼü×Ö£¬ÓÃÀ´±íʾһ¸öÓò²»ÊǸöÔÏó´®Ðл¯µÄÒ»²¿·Ö¡£µ±Ò»¸ö¶ÔÏó±»´®Ðл¯µÄʱºò£¬transientÐͱäÁ¿µÄÖµ²»°üÀ¨ÔÚ´®Ðл¯µÄ±íʾÖУ¬È»¶ø·ÇtransientÐ͵ıäÁ¿ÊDZ»°üÀ¨½øÈ¥µÄ!
public class User implements Serializable{
private static final long serialVersionUID = 1L;
private Integer id;
......
ҪʹÓÃjava caching system£¬ÐèÒªÏÂÃæÕ⼸¸ö°ü£ºjcs.jar£¬concurrent.jar,commons-logging.jar, commons-lang.jar,commons-collection.jarÕ⼸¸ö°ü£¬ÔÚjava¹¤³ÌÀïÃæ£¬
Ê×ÏÈн¨Ò»¸öʹÓÃjcsµÄÅäÖÃÎļþ£ºcache.ccf£¬ÎļþÃû²»Äܸġ£
# DEFAULT CACHE REGION
# sets the default aux value for any non configured ca ......