In my code, i have the four variables declared but when I try to verify it it says that I have not declared the 4 variables. How do I fix that if the four variables seem to be declared to me?
package com.codegym.task.task05.task0501;
/*
Creating a cat
*/
public class Cat {
String name;
int age;
int strength;
int weight;
Cat catBen = new Cat();
{
catBen.name="Ben";
catBen.age = 23;
catBen.weight = 165;
catBen.strength = 7;
}
public static void main(String[] args) {
}
}