Can someone please let me know what I have done wrong here?
I’d try removing the space before
(3) because that shouldn’t be there. Doesn’t make any difference to Java but perhaps codecademy is looking for things it really shouldn’t be.
If that doesn’t help, I’d try printing out spike. You won’t get very meaningful output, but it’ll tell you if you successfully created that object. Although there should be an error in the console if you had messed it up…
Are there no error messages at all?
And also indent everything to match your curly braces. Again, makes no difference to Java, but it shouldn’t look that way and perhaps codecademy is looking, who knows.
And just test your code. Print out the object, print out its age after creating it.
Perhaps clicking Get Help in the bottom right and choosing reset would help as a last resort.
If you run the program after creating that object and you DID NOT get any error messages, then you’ve created the object correctly and might have to use the " report a bug issue to report the issue to code cademy or like ionatan mentioned use the “restart excersise” tool in the help section.
Make sure that you specify the required int parameter age.
A post was split to a new topic: I tried to put “3” as dog’s age, but it doesn’t work. Don’t know why