seems to be similar to other solutions but it doesnt compile ?
thanks for helping
package com.codegym.task.task06.task0613;
/*
Cat and statics
*/
public class Solution {
public static void main(String[] args) {
// Create 10 cats
for (int i = 1; i <= 10 ; i++){
new Cat();
}
System.out.println(Cat.catCount);
// Display the value of the variable catCount
}
public static class Cat {
// Create a static variable catCount
public static int catCount = 0;
public Cat(int catCount){
this.catCount = catCount;
catCount++;
}
// Declare a constructor
}
}