Really lost in this assignment. I am a big guesser. So i just keep typing code till something sticks. This is not good.
Not sure how to assign and what i am assigning anything to. I tried going back to the beginning lessons and try starting all over, but for some reason once you complete a task, it says already verified, so i can't even check another solution to the code i right. Right now not even sure what to ask.
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();
//write your code here
//cat1 = 5;
Cat.cat1 = Cat.count;
Cat cat2 = new Cat();
//write your code here
//cat2 = 2;
Cat.cat2 = Cat.count;
System.out.println("The cat count is " + Cat.count);
}
public static class Cat {
public static int count = 0;
}
}
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();
//write your code here
Cat.cat1 = Cat.count;
Cat cat2 = new Cat();
//write your code here
Cat.cat2 = Cat.count;
System.out.println("The cat count is " + Cat.count);
}
public static class Cat {
public static int count = 0;
}
}