Your operating system may limit the number of files one process can have open. Generally you want to be careful with resources like open files in java. Unless you have a specific reason for keeping all of those open, you’d be better off reading through each file, extracting the data you want, and then closing. Remember to close() your files when you are done using them.
Your operating system may limit the number of files one process can have open. Generally you want to be careful with resources like open files in java. Unless you have a specific reason for keeping all of those open, you’d be better off reading through each file, extracting the data you want, and then closing. Remember to close() your files when you are done using them.