Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

indexOf()

  1. Start with this code
public class MorseCode {
  
  public static void main(String[] args) {
    
    String code = ".... .. / .. .----. -- / ... --- -. -. -.-- / .- -. -.. / .. / .-.. .. -.- . / - --- / . .- - / .-. .- -- . -.";

    // Write the code:
    
    
  }
  
}
  1. 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