import java.io.File;
public class Test{
public static void main(String[] args){
File dir = new File("F:\\");
bianLi(dir);
}
public static void bianLi(File dir){
if(dir.isDirectory){
String[] strs = dir.list();
for(int i = 0;i<strs.length;i++){
bianLi(new File(dir,strs[i]));
System.out.println(strs[i]);
}
}
}
}