import java.io.File; import java.io.IOException; public class ListFiles{ public static void main(String[] args){ File f = new File("f:"+File.separator+"编程小神仙"); String lf[] = f. listFiles; for(int i=0;i<lf.length;i++) System.out.println(lf[i]); } }