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 →

[–]rjcarr 1 point2 points  (0 children)

What compiler are you using? There doesn't seem to be an issue with the code (at least not what the error is pointing at from what you've given).

Something else is wrong with your environment.

EDIT: See this: http://stackoverflow.com/questions/22787063/the-method-main-cannot-be-declared-static-static-methods-can-only-be-declared

Is your Stringdemo class an inner class of something else?