Don't know what went wrong


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. 



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!


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


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