how to print arraylist code example
Example 1: printing arraylist
for(int name: arraylist)
{
System.out.print(name + " ");
}
Example 2: how to print arraylist
Arrays.toString(list.toArray())
for(int name: arraylist)
{
System.out.print(name + " ");
}
Arrays.toString(list.toArray())