Despite all my attempts, it looks like there's something I don't see.
Can someone guide me please?
package com.codegym.task.task06.task0613;
/*
Cat and statics
*/
public class Solution {
public static void main(String[] args) {
// Create 10 cats
for(int i = 0; i < 10; i++){
Cat cat = new Cat();
}
// Display the value of the variable catCount
System.out.println(Cat.countCat);
}
public static class Cat {
// Create a static variable
public static int countCat = 0;
public Cat(){
countCat++;
}
// Declare a constructor
}
}