Don't know what went wrong


#1



7/13 Java/Objects


I don't know why error keeps popping up.


  int age;

    public Dog(int dogsAge) {
  	age = dogsAge;
    
  }

    public static void main(String[] args) {

  Dog mySpike = new Dog(9);
  }
}


Replace this line with your code. 



#2

Hey.

Nothing technically wrong with your code.

Try renaming mySpike to just spike. Sometimes in the instructions can be quite strict as to what you should be naming variables. mySpike in any other case would have worked just fine though!


#3

thx bro! ;;;;;;;;;;;;;;;;;;;


#4

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