print a list java

Java
for(int i = 0; i < models.size(); i++) {
    System.out.println(models.get(i).getName());

Source

Also in Java: