This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes probelm with errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "probelm with errors" Watch "probelm with errors" New topic

probelm with errors

Rohit chandra

Joined: Jun 23, 2007
Posts: 15

I get error as class,interface or enum expected( in main method), couldnt figure out why??
Rohit chandra

Joined: Jun 23, 2007
Posts: 15
It also flags an error to put ; after ever if statement???
marc weber

Joined: Aug 31, 2004
Posts: 11343

Remember, Java is case sensitive. "If" is not "if".

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
arulk pillai
Ranch Hand

Joined: May 31, 2007
Posts: 3219
I think you are missing a closing curly bracket "}" for the class Database. Are you using any IDE like eclipse, NetBeans etc.

Java Interview Questions and Answers Blog | profile | Java Interview Books
Jeremy Botha
Ranch Hand

Joined: Feb 16, 2005
Posts: 125
Is that the full source of your Java class?


McFinnigan? Never heard of him. Nobody here but us chickens...<br /> <br />SCJP for Java 1.4<br />SCJD for Java 5.0
I agree. Here's the link:
subject: probelm with errors
Similar Threads
Large Numbers
Suppressing proceeding statements after if statement fails
About input streams
Hi check this code.It is not going in if condition
[HOMEWORK] Please need help with java project