Lista de impresión en Java
for(int i=0;i<list.size();i++){
System.out.println(list.get(i));
}
Mysterious Mosquito
for(int i=0;i<list.size();i++){
System.out.println(list.get(i));
}
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 + " ");
}