ArrayList  add方法
public static List listFile(File f)  
	{
	    //是目录,同时需要遍历子目录
	    if (f.isDirectory())
	    {
	     File[] t = f.listFiles();
	     for (int i = 0; i < t.length; i++)
	     {
	      listFile(t[i]);
	     }
	    }
	    else  
	   {
	     String filename = f.getName();
	    fileList.add(filename);
	   }	    
	    return fileList;
	 }
如何在调用这个方法时将fileList里面的数据清空?
------解决方案--------------------
fileList.clear();可以清空,不知道是不是你要的方法.........
------解决方案--------------------让fileList 成为ArrayList的对象,通过new关键字实现
fileList = new ArrayList();
然后fileList就可以调用Arraylist里面的方法clear()方法,移除此列表中的所有元素。这样就可以清空数据