File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 3371
I think you are missing a closing curly bracket "}" for the class Database. Are you using any IDE like eclipse, NetBeans etc.

[] | [Java job hunting know how] | [Java resumes]
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
It's not a secret anymore!