Stuck at 65% on learn java


#1

when I type public void run() { } in between the bark and main command it did not work


#2

Is this what your code looks like?

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

#3

yes I did the same thing it wont work


#4

Which step is hanging? 1, 2, 3 or 4?


#5

Is someone on codecademy going to fix fix? I also reported this bug a few days back and it doesn't seem like its fixed.


#6

Yeah same thing happened here. Make me wanna bark the code.


#7

Here is the error they are likely experiencing.

For the record, if you are getting this error, you've gone too far ahead. You have to start with step one and then do what it says in step two. If you skip ahead and go straight for step 4 then it will be unable to detect the method.


#8

your code shoold look like this.

class Dog extends Animal {

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 int getAge() {

return age;

}

public static void main(String[] args) {

Dog spike = new Dog(5);
spike.bark();
spike.run(40);
int spikeAge = spike.getAge();
System.out.println(spikeAge);
spike.checkStatus();

}

}


#9

Anyone that gets stuck on the editor try typing just

public void bark() {

System.out.println("Woof!");

}

This worked for me. Make sure that you clear out all of the rest of the code except for the main method and it should let you pass this step.


#10

Hey were you able to figure out how to pass 65%? It wont work for me. I get the same error you had.


#11

just reply 3 or 4 times, without changing the code, and you can request the solution from the popup menu, and study that..


#12

You should write a run method between the bark method and the main.

Here is what your code should look like