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("
Using for-each loop
");
for (String str : arrlist)
{
System.out.println(str);
}
for(int name: arraylist)
{
System.out.print(name + " ");
}
for (int[] array : myList) {
for (Integer i : array) {
System.out.println(i);
}
}
for(int i = 0; i < models.size(); i++) {
System.out.println(models.get(i).getName());