Simple spell check program in java