I'm a little new to programming and for my class I've been asked to do a recursive program where you input a directory and it will find all the files in that directory and any subdirectories in that directory, etc etc until there aren't any more subdirectories.
Quite honestly, I'm stumped. Recursion is really confusing for me and I could use a little help. Any coding/implementation help would be wonderful if you know how to do this. I would also accept any help regarding the stop condition of the recursion, how to enter a directory once you've found out that it's a directory via isDirectory() or if there is some other methods of retreiving the files in a directory and checking if there is another directory inside that, and/or generally anything i should know about this recursive program that could be helpful.
If you do provide code, please note that I need to put it in a JTextArea from the Swing library eventually (if that helps).
p.s. I've searched for something like this but either it doesn't use the File library as i'm supposed to or it's not really similar to my problem.