Added the letters.in text file, added a try catch block for the file exception handling. Changed while(s.hasNext()) to while(s.hasNextLine())