Java tutorial
//package com.java2s; /* Copyright 2004 - 2007 Kasper Nielsen <kasper@codehaus.org> Licensed under * the Apache 2.0 License, see http://coconut.codehaus.org/license. */ import java.util.LinkedHashMap; import java.util.Map; public class Main { public static Map<Integer, String> asMap(Map.Entry<Integer, String>... entries) { Map<Integer, String> map = new LinkedHashMap<Integer, String>(); for (Map.Entry<Integer, String> name : entries) { map.put(name.getKey(), name.getValue()); } return map; } public static String getValue(int key) { return "" + (char) (key + 64); } }