Stuck in method II, 10

Please I try I don’t know how many times, I reset the code, the page, everything and doesn’t work, the error it doesn’t matter how many time cut and paste again or write, said the same:

-Did you create the run method? Place it between the bark and main method.

class Dog {

int age;

public Dog(int dogsAge) {

age = dogsAge;

}

public void bark() {

System.out.println("Woof!");

}

public void run(int feet) {

System.out.println("Your dog ran " + feet + " feet!");

}

public static void main(String[] args) {

Dog spike = new Dog(5);
spike.bark();
spike.run(40);

}

}

Have the same problem, checked the code multiple times. Seems to be a bug or a wrong declared instruction.

Exactly the same problem. Has to be a bug. Hope it gets fixed soon, now I’m stuck!

Same problem here.
Any ideas for a workaround to this exercise while we all wait for solving the issue? ;- )

UPDATE:
Ok, I’ve found something. This works for me to go beyond “instruction point 1.”:

class Dog {

int age;

public Dog(int dogsAge) {

  age = dogsAge;

}

public void bark() {

System.out.println("Woof!");

}

public void run() {

}

public static void main(String[] args) {

Dog spike = new Dog(5);
spike.bark();
}

}

Rest of the points from the instruction work fine after you skip the first one. :slight_smile:

4 Likes

Thanks, worked for me! I’m continuing on the path. :slight_smile:

Thank you! This bugged me for ages. :grin:

Was stuck here too, this answer worked for me; It seems that on all the other exercises, I could do all the steps at the same time, but this page would only accept it if it was done one step at a time (even though exactly the same code used).

Worked for me, thanks!

Thanks! Have some pizza :pizza:

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