Note: If you’re getting an error in the console about a main method, include the following code within the Dog class (it will be explained later in this lesson):
And This Is My Code
class Dog {
//The class constructor for the Dog class
public Dog() {
public static Dog void main(String[] args) {
But I get an error can someone give me the proper code so that I can move on lol (:
Your dog constructor must not contain anything else for the moment. It should just be an empty constructor. ie.
public Dog() {
}
Also, there is a problem with your main method. You need not have to include Dog in the method signature. Our main method should always have the basic outline shown below:
public static void main(String[] args) { // Dog omitted
}
Last thing. I don’t see a closing brace for the Dog class. Make sure your closing curly brace is after everything else. Including the main method and it’s closing curly brace.
All in all, it should look like this:
class Dog { // Dog class begins
//The class constructor for the Dog class
public Dog() {
}
public static void main(String[] args) {
}
} // Dog class ends
Thank you so much angusbeef it worked for me I am very grateful for your help lol if it was not for you I would not have made it this far lol thank you so much :D!!! <3