I am trying to index multiple file names (.txt) in an array.
for example
static String[] filename = new String[40];
and I have 40 files in the project directory. I want to insert their names into an array using a for loop rather than typing it manually. filename[0] = ".txt"
.