Lesson 3/4 instance Variables


Why don't regonize de variable 'age' in code?

Did you create an instance variable called age? Place it inside of the class, but before the Dog constructor.

Replace this line with your code. 
class Dog{
  int age;
  //class constructor
    public  Dog(){

public static void main(String[] args) {


remove this comment you made

//class constructor

then try


ok, vary good! but it is doubt?
than it's not permit to inside document line?

Thank for the help


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