- Start with this code
public class MorseCode {
public static void main(String[] args) {
String code = ".... .. / .. .----. -- / ... --- -. -. -.-- / .- -. -.. / .. / .-.. .. -.- . / - --- / . .- - / .-. .- -- . -.";
// Write the code:
}
}
-
In MorseCode.java, there’s a string named
code
that has some funny characters.Find the index where the substring
. .- -
(which means “eat”) begins!
Example solution can be found in the MorseCode.java file