java arraylist display all elements objects code example
Example: printing arraylist
for(int name: arraylist)
{
System.out.print(name + " ");
}
for(int name: arraylist)
{
System.out.print(name + " ");
}