Stuck on using methods

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<Dog.java:5: error: cannot find symbol
age=dogsAge;
^
symbol: variable age
location: class Dog
Dog.java:5: error: cannot find symbol
age=dogsAge;
^
symbol: variable dogsAge
location: class Dog
2 errors.>

```

I think i definitly followed the instruction ,but it still told me wrong finally,

class Dog {
int Age;

public Dog(int dogsage) {
age=dogsAge;
}
public void bark(){
System.out.println(“Woof!”);

}
public static void main(String args) {
Dog spike = new Dog(3);
spike.bark();

}
}

<do not remove the three backticks above>

here, write age instead of Age

class Dog {
int Age;  

and here
inside parameter dogsage should be dogsAge

public Dog(int dogsage) { // 
age=dogsAge;

remember java is case-sensitive.

Thank you so much for your help .

Have a nice day ,

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.