Possible Error?


Hello all, pfm2001 here. I've been learning Java for a bit, and I've noticed in the "Using Methods" area, it gives me an error even though I'm doing what they ask. They're asking me to call the "bark" method on the "spike" object, and the console outputs "Woof" as I am assuming it's supposed to, but they keep saying that: "Did you call the bark method on the spike object? Make sure you call it inside of the main method.". I will include my code below. Please tell me if I have made a mistake.

class Dog {

int age;

public Dog(int dogsAge) {
age = dogsAge;


public void bark() {


public static void main(String[] args) {

Dog spike = new Dog(5);




Had another one just like this yesterday, took me a while to find it then. :smile:

Woof needs to be Woof!