I am having the error message appear: “Did you call the bark method on the spike object?”
I don’t know where I am going wrong here: My code is below:
public 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(3);
spike.bark();
}
}