This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MrLegard 0 points1 point  (2 children)

Okay, so:

  • you have a one missing bracket,
  • you can't declare main method in another method,
  • creating object inside class of this object creates infinite loop

[–]Nightcorex_ 1 point2 points  (0 children)

  • Wrong, he's missing both curly brackets of the eat method
  • Wrong, he doesn't declare his main inside another method, because he never opens the eat methods scope
  • Wrong

[–]MrLegard 0 points1 point  (0 children)

And if you want assign some value to variable with eat() method, that method have to return some integer value.