9. I am having the error message appear

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(){
public static void main(String args)
Dog spike=new Dog(3);

A post was split to a new topic: 9. I copied the example exactly but put in the information the instructions ask for but I still get an error asking if I called the bark method

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