Update hangman.java

added comment before method to explain what was done