Methods II instruction 3, command not typed correctly?


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.

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 int getAge(){
    return age;
	public static void main(String[] args) {
Dog spike = new Dog(4);
	int spikeAge = spike.getAge();

Replace this line with your code.


Try running it in a different browser.


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