|
Just use different constructor
FileWriter has an other constructor where you can specify whether to append or overwrite.
use
out=new FileWriter("E:/Documents and Settings/Naresh/Desktop/java/xyz.txt",true);
the boolean true will set that to append mode.
|