my dog learned polymorphism*
The moose likes Beginning Java and the fly likes Lottery Generator Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Lottery Generator Error" Watch "Lottery Generator Error" New topic
Author

Lottery Generator Error

Rebecca Plumb
Greenhorn

Joined: Dec 09, 2007
Posts: 9



[B]ERRORS:
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
The method printASetOfLotteryResults() is undefined for the type LotteryDrawing
Syntax error on token "void", @ expected
printASetOfLotteryResults cannot be resolved to a type
Syntax error, insert "enum Identifier" to complete EnumHeaderName
Syntax error, insert "EnumBody" to complete BlockStatement

at LotteryDrawing.main(LotteryDrawing.java:8)
[/B]


Rebecca
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

I think your compilation problem is primarily just misplaced/missing braces. If you align your indentation more carefully, you will see how these are (not) lining up.

Also, you can't return a value from a method with a return type of void. And if you do have a return statement, then that's where the method exits, so any code following it will be unreachable.
[ April 14, 2008: Message edited by: marc weber ]

"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
 
jQuery in Action, 2nd edition
 
subject: Lottery Generator Error