I have code that is storing Strings in a ArrayList
ArrayList<String> cars = new ArrayList<String>();
cars.add("Volvo");
cars.add("BMW");
cars.add("Ford");
cars.add("Mazda");
cars.add("Honda");
cars.add("Tesla");
Is there a way for the out put to be
Volvo, BMW
Ford, Mazda
Honda, Tesla
and not [Volvo, BMW, Ford, Mazda, Honda, Tesla]
my problem is every n elements, not just 2
My thought was to make a new String for every n elements than store that in an Array