Hi ,
I am getting trouble by using FileWriter.
I created a file by using FileWriter class.
I called the file from some other class.
In the second class, I am able to write a string to that file.
I application is still active. But I am not able to append another string to that file eventhough I gave "true".
Whats my problem.
Class1{
void method1(){
FileWriter fr = new FileWriter(filename,true);
}
}
Class2{
void method2()
{
String mystring;
fr.write(mystring);
fr.close();
}
here I am able to write the string to that file. but next time it is suposed to merge the second string to that file. It is not merging.
I appreatiate all your help,
I am getting trouble by using FileWriter.
I created a file by using FileWriter class.
I called the file from some other class.
In the second class, I am able to write a string to that file.
I application is still active. But I am not able to append another string to that file eventhough I gave "true".
Whats my problem.
Class1{
void method1(){
FileWriter fr = new FileWriter(filename,true);
}
}
Class2{
void method2()
{
String mystring;
fr.write(mystring);
fr.close();
}
here I am able to write the string to that file. but next time it is suposed to merge the second string to that file. It is not merging.
I appreatiate all your help,