Why isn't this working help!

Not sure why this won’t work, im not getting an error message but according to code academy im doing something wrong. Anyone?

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

spike.bark();
spike.run(500);
}

}

<do not remove the three backticks above>

What’s it’s saying you do wrong? What exercise is it?

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

Its excersize 10/13 of the Methods II portion of Learn java

Completing the checkpoint that follows interferes with passing that one. One at a time I guess.
They search for very specific patterns of text in your code, in this case:

/[Oo][Oo][Ff]\s*!?\s*"\s*\)\s*;\s*\}\s*public\s+void\s+run\(\s*\)\s*\{\s*\}\s*public\s+static/

Which has only whitespace inside the method and its argument list

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