[java] How to display all elements in an arraylist?