Take a look at the API for the File class
File (Java Platform SE 6)
In particular the listFiles methods