This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
It's more obvious once the code is formatted correctly (I've just added code tags and fixed the indentation - see UseCodeTags if you want to know more about them). Then you can clearly see the main method is outside the class, as Harsha says. In Java all code must be inside a class.
Joined: Jan 23, 2012
ya changed the format. thank's yaar
subject: java error class, interface, or enum expected