7/13 Objects

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

```

Replace this line with your code.

<do not remove the three backticks above>

Replace this line with your code.

it means you have to delete this line and write or paste your code in that place so we can see that :slight_smile:

tell us whats your problem?where did you get stuck? we cant help you without knowing your problem.

Well I have a problem,
I have made this code:
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();
}

}

An I got “woof” on the other screen, but it ceeps saying that it is wrong but I have don the command
So I don’t know what I did wrong.
Could you help me?

(Btw. this is the command
Inside of the main method of the Dog class, call the bark method on the spike object.)

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