java - dynamically naming a text file as output -
i have loop in each iteration text file should generated. problem naming text file. because of lack of knowledge in java, don't know how should name output files dynamically. names should dependent index of loop. in advance. using printstream.
just build file name index variable.
for(int x = 0; x < 10; x++){ string filename = "file_" + x + ".txt"; file file = new file(filename); }
Comments
Post a Comment