Java examples for java.util:Collection Creation
Create singleton map
//package com.java2s; import java.util.Collections; import java.util.Map; public class Main { public static <K, V> Map<K, V> map1(K key, V value) { return Collections.singletonMap(key, value); }/* ww w . j a va 2s .c o m*/ }