Not sure what I'm doing wrong here. Can someone help me figure out why it's saying it has more than one count variable?
package en.codegym.task.jdk13.task04.task0407;
/*
Count the number of cats
*/
public class Solution {
public static void main(String[] args) {
Cat cat1 = new Cat();
Cat cat2 = new Cat();
System.out.println("The cat count is " + Cat.count);
}
public static class Cat {
public static int count = 0;
public Cat() {
// The count variable is incremented in the constructor.
count++;
}
}
}