9/13 error I think


#1

Hi Guys, I think this number is error,
I have follow the instruction about the call inside the main method,
I did exactly just like the example and the display printed out exactly just like what the it suppose to (based on example), but I cannot finnish this question....

"Did you call the bark method on the spike object? Make sure you call it inside of the main method." - the instruction

"Woof" the display printed out

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(6);
   spike.bark();
  	}

}


#2

you missed a !
it would be Woof! // add a ! after Woof


#3

Geez, you are right.
Thank you bro!


#4

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