Still they want me to place the run method in between the bark and main method. Why?

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

```

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(2);
spike.bark();
spike.run(20);
}

}

<do not remove the three backticks above>

it worked i simultaneously did all the steps and even they count /comments/ as error.

I had the same exact problem! I reset the code and did it step by step, running it after each step instead of doing it all together. Maybe that will help you as well ?

Codeacademy is a POS when their own application won’t clear an error, even when you code it correctly.
Multiple exercises found where a user will code it correctly, yet it won’t clear the error.

Thanks for your attention friends i have solved the bug its just simple do it step wise you will not encounter any error. But in coming lessons of data structures they have some bug in exercise 7/13 if you encounter it then just simply refresh or restart the exercise.

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