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 (4) ;
}
}
Error MSG
Did you create a Dog object using the Dog constructor? Make sure you indicate an integer parameter. Use the example to help you.
I have tried it several times but this is not working … Can anyone solve this problem ???