I need to write a code in which i want to create each file for every iteration of a loop add data into the file. also the filename should change every time.
for example: familyname1_parts.txt for 1 iteration for second
familyname2.parts.txt for 2 iteration and so on..
try
{
out = new FileOutputStream(set.fileLoc + "" +set.fileName,true);
p = new PrintStream( out );
here fileloc and set.filename is fetched from a properties file..
earlier all data was added to the same file.
How can we change file name everytime?