Reputation: 680
I have declared and initialed say a String temp = null;
through the program i am changing the value of temp by
temp = temp + folders[i] + newline;
and then write this String temp to a text file.
Now the issue is, every time I write it to the file, the word "NULL" gets printed too.
Please suggest me a work around.
Upvotes: 2
Views: 2949
Reputation: 19502
temp = temp + folders[i] + newline;
is
temp = null + folders[i] + newline;
so it will print null in the file use "" instead
Upvotes: 1