<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.>
https://www.codecademy.com/en/courses/learn-java/lessons/object-oriented-programming/exercises/using-methods-2?action=resume
<In what way does your code behave incorrectly? Include ALL error messages.>
In my code, it’s claiming that I have not called the “System.out.println(spikeAge);” method in the code, for whatever reason. I’ve tried restarting this section, rewriting it, copying and pasting it from the left box, everything, but it seems to think I’m incorrectly writing the code each time. Is it something obvious I’m missing? I’m using Chrome, if that helps.
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(4);
int spikeAge = spike.getAge();
System.out.println(spikeAge);
spike.bark();
spike.run(600);
}
}
Replace this line with your code.
<do not remove the three backticks above>