i am dealing with a compile error . from line 25 of task 0614. i do not understand since the error is from code provided to complete task .
file com/codegym/task/task06/task0614/
Cat.java/line 25/position 353.
illegal start of expression.
public static void printCats()
^
Thanks
package com.codegym.task.task06.task0614;
import java.util.ArrayList;
/*
Static cats
*/
public class Cat {
public static ArrayList<Cat> cats = new ArrayList<>();
public Cat() {
}
public static void main(String[] args) {
for (int i = 0; i < 10; i++) {
cats.add(new Cat());
printCats();
}
public static void printCats() {
System.out.println(cats);
}
}
}