9. Using method I


#1

Hi, I keep getting an error message regarding calling for the bark method on spike.
This is my code for the main method:

public static void main(String[] args) {

Dog spike = new Dog(5);
spike.bark();
}

This is the error message I keep receiving: "Did you call the bark method on the spike object? Make sure you call it inside of the main method."

Can someone help me?


#2

Could you post a screenshot of you whole browser please?


#3

Here you go


#4

Thanks! That looks perfect. Try these things, one at a time, until you hit one that works (hopefully):

  1. reload/refresh the web page
  2. go back one exercise and come forward to this one again
  3. use the Reset the Exercise option, it's under the Get Help button
  4. try a different web browser (if you can)

#5

Had the same problem.
Restart helped!


#6

add } at the very bottom.


#7

I'm curious about what that would accomplish? Is there a matching { to go with it?


#8

Do you mean restart the page, or restart under the get help button? :confused:
I had this same problem.


#9

I everybody, I'm new here and I have the same probleme that you had. When I refresh the page, I have the error message: "Did you call the bark method on the spike object? Make sure you call it inside of the main method." I need your help guys thx :smiley:


#10

If you post a screenshot, we can have a look.


#11

Go to get help and on the bottom "Reset this excercise". That helped.


#12

typo error: its "Woof!" not "Woof" (ur missing the exclamation mark).


#13

Haha I was wondering what I did wrong, and I just forgot to add the ! to the end off the Woof, so stupid.


#14

Thanks for your help


#15

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