The class constructor for the Dog class

<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>

class Dog {
//The class constructor for the Dog class
public Dog() {

 }

}

public static void main(String args){

}

what iam doing wrong here ??

What is the link of the exercice?

https://www.codecademy.com/en/courses/learn-java/lessons/object-oriented-programming/exercises/classes-constructors?action=resume?&toperStarEhJUS=1

Unfortunately i can’t see the exercice yet. What is the instruction?

i want to creat a constructor for the class but some thing going wrong and idonot know what it is ??

Do you get error if you remove the public static void main ...?

oops… My fault… Replace the main inside of the class. Like

class Dog{
    public Dog(){}
    public static void main(String[] args){}
}
1 Like

ok i got it
the sentence of //The class constructor for the Car class was the mistake
i should not write it

thanks for your help :relieved:

You’re welcome. :+1:

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