I just looked it up (the Keyboard class is a class that my lecturer provided and recommend we use for reading input) and the readChar() method doesnt throw IOException. Am I buggered? Are there any other classes I can use?
David Newton wrote:Does Keyboard.readChar() throw an IOException?
Where did I do that?
Why do you set a variable to itself? (And, in general, instance variables begin with a lower-case letter: going against convention makes it difficult for others to read your code.)
So, your goal is to throw an IOException? What are you really trying to accomplish? I think things are as simply as: if an exception has no chance of being thrown, don't add it to the throws clause!
Andrei Chetronie wrote:Am I buggered? Are there any other classes I can use?
Look at your code. It's plain as day.Where did I do that?
Why do you set a variable to itself?
And to emphasize what David said: not following conventions makes your code surprisingly hard to read.