At the beginning of the program declare ints yesCounter and noCounter. Set them to zero initially.
Then, every time you get user input that is 'y', increment yesCounter. Every time you get user...
Type: Posts; User: Zaphod_b
At the beginning of the program declare ints yesCounter and noCounter. Set them to zero initially.
Then, every time you get user input that is 'y', increment yesCounter. Every time you get user...
OK, here are the lines immediately before the error line: (I fixed the formatting a little.) Note that nowhere in your program before these lines is answer11 given a value.
if ( 'y' <...
I hate to repeat myself, but
The idea is not for us to debug the program but for us to try to help you see how to get to the bottom of things. The exact error messages, including line numbers...
Aren't you getting other compiler messages too? I mean, where is "Keyboard" defined?
Post the entire class file (including import statements) and post all compiler messages. Don't abbreviate. ...