import java.io.*;
import java.util.*; public class DirList { public static void main(String[] args) { File path = new File("."); String[] list = path.list(); for(int i = 0; i < list.length; i++) System.out.println(list[i]); } } pass the
directory name in the constructor whose files u want to
list.
Cheers!!
raj
|