Java code that simulates a simple Morse Code reader.