コード例 #1
0
 public SafeStates() {
   states = new HashMap<String, String>();
   states.put("alaska", "AK");
   states.put("alabama", "AL");
   /*...*/
   states.put("wyoming", "WY");
 }
コード例 #2
0
 public String getAbbreviation(String s) {
   return states.get(s);
 }