How do I read filenames from a folder and add them into an arraylist without having to make an array and looping all the answers into the arraylist?
For example, lets say I have a list of txt files in a folder. What do I need to do in order for Java to read through each of the file names and add them into a string array list without having to do a String[]
like other answers have suggested?