Java Methods II error


#1

i cant do this exercise so i pressed get code and even after he gave me the right code its still says "Did you create the run method? Place it between the bark and main method" in the error bar
heres 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);

}

}


#2

@microninja86348 your code worked fine for me when i copy+paste it. May i ask what browser you are using(Chrome is the reccomended one for Codecademy)... Can you also organize your code by looking at this topic:


#3

I would like to see a screenshot of your whole web browser so that I can see what you are seeing.


#4

A post was split to a new topic: "Did you create the run method? Place it between the bark and main method"


#6