Java one file to anothe file appending

Multi tool use
I have two data file Test1 and Test2.
Test1 datas:
Test2.txt
test4.txt(Output file)
My code:
The output I get is something like that:
[1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 17.0]
But the remaining columns are not there in my output. I take the 1st Columns of both file as my key attribute and insert element depending upon there ordering. What should I do to get my desire output?
I would create a class to keep your data in. Something like:
You can then keep an ArrayList, reading one lines values into one MyData object. You could then use Collections.sort(that arraylist) to sort it, and then iterate over it and print it to your file.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.