I want the data in my CSV be dynamic and giving varian of values. Like this :
This is my code :
I think the problem is my array. Am I right?. Because when I try in fixed array it was succesfull. But when I try my code in above it just give me one result. I really tried in this case and stuck about it. Really need your help. Thanks
When I try to print the output of array in system.out.print it shows the contains of array but in separated results
Do you know how to get the dynamical value of array?
Because I've search it through google and a lot of forums but still dont get the answers
Please give me direction or clue
This is what Carey meant by
Carey Brown wrote:Your BufferedWriter is not being opened for append
Simple solution, tell the FileWriter you wish to append the contents.
How do you do it? Check out the constructors available for FileWriter
So there is any missunderstanding between us
I just a beginner in java programming language. Please don't be angry to me
So I have to create constructors in that class like what you said, Mr. Godbole?
Junita Eka Sari wrote:So I have to create constructors in that class like what you said,
Yup. You need to use
As per the API docs,
public FileWriter(String fileName,
Constructs a FileWriter object given a file name with a boolean indicating whether or not to append the data written.
fileName - String The system-dependent filename.
append - boolean if true, then data will be written to the end of the file rather than the beginning
I think the mistakes in my array. Because when I print it give me results not like in one brackets like this [122,233,-3,...] but the result like this , , [-3], ..... I think that's why the header get iterations too. Am I right?