OO Step 9. code returns woof but still error message```


#1

WOOF IS RETURNED BUT Error asks about spike calling bark and if inside main method

class Dog {
  int age;
  

  public Dog(int dogsAge) {
   
    age = dogsAge;
  }
  public void bark() {
   
    System.out.println("Woof");
  }
	public static void main(String[] args) {
    Dog spike = new Dog(7);  
     spike.bark( );
  }
  
	}

#2

Hi @tallpaulp ,

The Dog class needs a louder bark, enhanced by an exclamation point ...

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

#3

Dear @geomaticmashups,

Thank you for taking the time to solve my problem. I solved this on my own; It was the error message which was not diagnostic. I have seen this before when I don't follow instructions exactly but try to be a little more advanced. The output is correct yet I still receive an error message which doesn't make any sense. After I get the answer the tool wants I can substitute any value and everything is fine.

Good Coding,
tallpaulp