Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

probelm with errors

 
Rohit chandra
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I get error as class,interface or enum expected( in main method), couldnt figure out why??
 
Rohit chandra
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It also flags an error to put ; after ever if statement???
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Remember, Java is case sensitive. "If" is not "if".
 
arulk pillai
Author
Ranch Hand
Posts: 3387
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are missing a closing curly bracket "}" for the class Database. Are you using any IDE like eclipse, NetBeans etc.
 
Jeremy Botha
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that the full source of your Java class?

J
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic