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

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -