Learn java 10.Method II



The instruction says to write a method 'run' for the class Dog in between Bark and Main(two already written methods).
I did the same but error came.
Error says:Did you create the run method? Place it between the Bark and main method.
Pls help I'm a beginner.

Replace this line with your code.



I had this problem too, but it went away by finishing the rest of the steps in the lesson and running it. I think it might be a bug, ¯\(ツ)/¯. Godspeed.


same prob here aswell


i am having the same problem here


this is stupid. It won't let me pass this section with the same stupid error which asks me to place the run method between the bark and main method.

class Dog{

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

public void bark() {

public void run(int feet) {
System.out.println("your dog ran " + feet + " feet!");

public static void main(String[] args) {

Dog spike = new Dog(5);



I saw couple of people struggling with this part of the exercise. Please find the attached screenshot. I hope it will help!


Here is the full solution!


Sometimes the code is right but you have to use a different browser. The photo that zabideen1 posted was perfect. Also scriptninja17250, I tried your code and it worked fine on all browsers. Hope I helped!


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