Java examples for java.lang:String Algorithm
get Contractions String
//package com.java2s; import java.util.HashMap; public class Main { public static void main(String[] argv) throws Exception { getContractions();/*www . j av a2 s.co m*/ } public static HashMap<String, String> contractions; private static void getContractions() { // TODO Auto-generated method stub contractions = new HashMap<String, String>(); contractions.put("won't", "will not"); contractions.put("shan't", "shall not"); contractions.put("let's", "let us"); contractions.put("that's", "that is"); contractions.put("it's", "it is"); contractions.put("'em", "them"); } }