I'm not sure what I'm missing, could someone give me a tip?
package com.codegym.task.task06.task0614;
import java.util.ArrayList;
/*
Static cats
1. Add the public static ArrayList<Cat> variable cats to the Cat class.
2. The variable cats must be initialized.
3. The main method should create 10 Cat objects (use the Cat() constructor).
4. The main method must add all the created cats to the variable cats.
5. The printCats method should display all the cat objects in the variable cats. Each on a new line.
*/
public class Cat {
public static ArrayList<Cat> cats = new ArrayList<>();
public Cat() {
}
public static void main(String[] args) {
for (int i = 1; i <= 10; i++) {
Cat cat1 = new Cat();
cats.add(cat1);
}
printCats();
}
public static void printCats() {
System.out.println(cats);
}
}