5/13 Don't understand my mistake


#1

class Dog {

int age;
public Dog(dogsAge) {
age = dogsAge;
}

public static void main(String[] args) {

}

}

This is my code, and it keeps giving me the error message 'Did you add the dogsAge parameter to the constructor?' Please help.


#2

For your method Dog, in the parameters you didn't define dogsAge whether it was an int or string so you need to edit that and write:

public Dog(int dogsAge) {
age = dogsAge;
}