Java tutorial
//package com.java2s; import java.util.Map; import java.util.TreeMap; public class Main { private static Map<String, String> charToMorseTable = new TreeMap<String, String>( String.CASE_INSENSITIVE_ORDER); public static String getMorseForChar(char ch) { return charToMorseTable.get(String.valueOf(ch)); } }