0
How does one println print out the whole array list?
I was surprised to see the whole arraylist printed out with a single println statement. I would have thought a loop would be necessary. Is this because of a toString method that's part the arraylist class?
1 Antwort
0
But you have that output [1, 2, 3, 4]. How about if you want a single element or print it on a separate lines or without a paranthesses (here you can use substring).