How to do Exercise 4/13?

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

From Learn Java.
I’ve been struggling with this for days :confused:

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/learn-java/lessons/object-oriented-programming/exercises/classes-instance-variables?action=resume

<In what way does your code behave incorrectly? Include ALL error messages.>
Error message: Did you create an instance variable called age? Place it inside of the class, but before the Dog constructor.

Didn’t I do that though?

```

public class Dog{
//instance variable for age of dog
int age;

public Dog() {  //constructor method for Dog class

}

public static void main(String[] args) {

}

}

<do not remove the three backticks above>

what is the question

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