dynamically naming a text file as output

I have a for loop that in each iteration a text file should be generated. The problem is naming text file. Because of lack of my knowledge in java, I don't know how I should name output files dynamically. The names should be dependent to the index of for loop. Thanks in advance. I am using printstream.
 
Top