Hangman app written in java