I have an ArrayList like this:
ArrayList<ArrayList<Double>> someArray = new ArrayList<ArrayList<Double>>();
It has values like this:
[1,3,2,1,3,4,5,5],[7,2,1,3,4,5,4,2,4,3],....
I want the output to look like this:
1 7 . . .
3 2
2 1
1 3
.
.
.
i.e each list in the ArrayList should be displayed as one column. I tried various ways but code displays them in rows..
for(int i=0;i<someArray.size();i++){
System.out.println(someArray.get(i));
}
Looks simple but unable to figure it out :-!
List?printlnis aprint \n(print + newline). If you want to print without going to the next line, useSystem.out.printinstead.