Satyen Singh wrote:please, specify the exact line on which you are getting error.
I'm pretty sure that's what he meant when he said:
In this line: 23
In this method:
As a general note, you should indeed ALWAYS use braces, even if not technically required. And even if you DO use braces, your firstNum will go out of scope once you exit from said braces, and will not be visible by the time you enter your switch on line 32 of the provided code.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: May 25, 2009
I will try using the braces, thank you.
subject: error: not a statement, '.class' expected, illegal start of expression, ';' expected