For this Question: Given a morse code, Your task is to figure out the exact words from it.
Morse Code Dictionary : 
dict = {".-": "A", "-...": "B", "-.-.": "C", "-..": "D", ".": "E", "..-.": "F", "--.": "G", "....": "H", "..": "I", ".---": "J", "-.-": "K", ".-..", "L": "--", "M": "-.", "N": "---", "O": ".--.": "P", "--.-": "Q", ".-.": "R", "...": "S", "-": "T", "..-": "U", "...-": "V", ".--": "W", "-..-": "X", "-.--": "Y", "--..": "Z"};

<img src="https://maker.pro/storage/sKEFbex/sKEFbexA2iF4ZvxgtvPaWXGHxMiwohU6FvxJgkCC.jpeg" height="100px" width="100px">The first line of the input contains the morse string.

<b>Constraints </b>
1<= Total Words <= 1000Print the English Alphabets from the given codeSample Input 1:
<pre>
.-- --- --.- - . .-. -..-
</pre>
Sample Output 1:
WOQTERX, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) {

	String code[]={".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",
".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.." };
       Scanner sc =new Scanner(System.in);
           String morseCode =sc.nextLine();
		   morseToWords(code,morseCode);
       }
     static void morseToWords(String[] code,String morseCode ){
       HashMap<String,Character> hs =new HashMap<>();
       for(int i=0; i<26; i++)
           hs.put(code[i],(char)('A'+i));


		String [] array = morseCode.split(" ");
           for(int i=0; i< array.length; i++)
           System.out.print(hs.get(array[i]));
       }
       }, In this Programming Language: Java, Now tell me if this Code is compilable or not?