学了那么久。到现在知道有 迭代器。比较器。现在又出了个过滤器。但是不清楚这个过滤器只是针对file的吗 
class MyFileFilter implements FileFilter{ 
 
 public boolean accept(File pathname) { 
  //System.out.println(pathname+"==========="); 
  //判断pathname全路径名的后缀,是不是.java结尾 
  //c:\demo\新建 Microsoft Office Excel 工作表.xlsx 
  return (pathname.getName().endsWith(".java")); 
 // return true; 
 } 
   
} 
public class FileDemo8 { 
 public static void main(String[] args) { 
  File file = new File("c:\\demo"); 
  //过滤器,加载到listFiles方法中的 
  File[] files = file.listFiles(new MyFileFilter()); 
  for(File f : files){ 
   System.out.println(f); 
  } 
 } 
} 
问题:还有其他类型的过滤器吗。。整体代码风格是怎么样的。 
 |   
        
 
    
    
    
     
 
 |