7/13 Objects


Replace this line with your code.


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() {



public static void main(String[] args) {

Dog spike = new Dog(3);


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.