displaying an arraylist's contents newbie question
i do not use java often...
i have an arraylist. how do i display all the contents of the arraylist in the terminal window?
thank you for your time
soemthing like this:
Iterator iter = myAbstractList.iterator();
System.out.println( iter.next().toString(); );
note: you only see soemthing sensible for objects that have a well defined toString method. if your arraylist contains custom objects, cast the iter.next() object into the custom object, and use it however
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center