posted 4 years ago
I have arraylist that contains a matrix of multiple lines of double values and scores of these lines called (array1). When I add array1 to another arraylist called (array) and print the last one, I got the outputs in one line rather than multiple lines.
Here is the code:
the outputs that I got in the following form
[2.0, -2.0, -2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 0.029852715932584623 0.0, -2.0, 2.0, 0.0, 2.0, -2.0, -2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, -2.0, 2.0, 0.010036388846744357 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 0.0, 2.0, 0.0 0.04592173526351916]
but I need them in the following form
2.0, -2.0, -2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, -2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 0.029852715932584623
0.0, -2.0, 2.0, 0.0, 2.0, -2.0, -2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, -2.0, 2.0, 0.010036388846744357
2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.0, 2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.2,0.2, 0.04592173526351916