How to make method printKoty(), printing "koty" each in new line?
package pl.codegym.task.task06.task0614;
import java.util.ArrayList;
import java.util.List;
import static java.lang.System.*;
/*
Statyczne koty
*/
public class Kot {
public static ArrayList<Kot> koty = new ArrayList<Kot>();
public Kot() {
}
public static void main(String[] args) {
Kot[] kot = new Kot[10];
int x = 0;
while(x<10) {
kot[x] = new Kot();
koty.add(kot[x]);
x++;
}
printKoty();
}
public static void printKoty() {
System.out.println(koty);
}
}