Cetak Arraylist Java
Arrays.toString(list.toArray())
Dark Dunlin
Arrays.toString(list.toArray())
//using for-each loop
System.out.println("\nUsing for-each loop\n");
for (String str : arrlist)
{
System.out.println(str);
}
for(int name: arraylist)
{
System.out.print(name + " ");
}