How to do Exercise 4/13?


#1


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


https://www.codecademy.com/en/courses/learn-java/lessons/object-oriented-programming/exercises/classes-instance-variables?action=resume


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) {

	}

}


#2

what is the question


#3

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