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?

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



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:


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.