This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths 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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "probelm with errors" Watch "probelm with errors" New topic
Author

probelm with errors

Rohit chandra
Greenhorn

Joined: Jun 23, 2007
Posts: 15


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

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

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
sscce.org
arulk pillai
Author
Ranch Hand

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


[Java-Success.com] | [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?

J


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: http://aspose.com/file-tools
 
subject: probelm with errors
 
It's not a secret anymore!