how to display all elements in arraylist in java code example
Example 1: java get all items from arraylist
for (int i = 0; i < arrlist.size(); i++) {
// Get each item (in this case print each item)
System.out.println(arrlist.get(i));
}
Example 2: displaying an arraylist in java
Arrays.toString(list.toArray())