Lesson 3/4 instance Variables


#1



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.
Run


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

  
public static void main(String[] args) {
  
    
   }
 }


#2

remove this comment you made

//class constructor

then try


#3

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

Thank for the help


#4

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