Campbell Ritchie wrote:Avoid System.exit; it appears all right in a simple example like yours, but can cause dangerous problems in more complicated programs.
Why are you using option panes for keyboard input? That is very old‑fashioned programming style.
Tobias Bachert wrote:The negation of "Yes or No" is not "Not yes or not no" but "Not yes and not no" ( !(a||b) <-> !a&&!b ).
You are going on about injuring the monster (surely a Knight would only kill a Dragon, and where is the PrettyMaiden class ?)
You are mixing System.out.print and println. Use as few print calls as possible. If you can amalgamate two calls into one, you can save several milliseconds.
You have repeated code in lines 40 and 50, and 59 and 72. That should be refactored.
Why don't you attack the monster object directly?