10/13 I don't know what I am doing wrong?

this is my code

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);

}

}

An It keeps telling me

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

Try to refresh the page or delete the code and paste it again.

i have refreshed also but it is not correcting how to do?

Same problem here. Stuck on the exact same thing. There is no error message I think its a bug or something

did it work for you yet? I typed almost word for word and it keep getting the same error

delete the thing you just wrote in 10/13, just type in

"public void run() {

}"

as required and run it .

Yeah I figured it out. You just need to do it step by step for it to run. Run 1 first and then 2 and then 3

3 Likes