I am on this task for hours. I really do not know how print the Arraylist items on a new line.
package com.codegym.task.task06.task0614;
import java.util.ArrayList;
/*
Static cats
*/
public class Cat {
//write your code here
public static ArrayList<Cat> cats = new ArrayList<Cat>();
public Cat() {
}
public static void main(String[] args) {
for(int i =0; i<10; i++){
Cat cat = new Cat();
cats.add(cat);
}
printCats();
}
public static void printCats() {
//write your code here
System.out.println(Cat.cats);
}
}