Java examples for java.util:HashMap
Creates a new empty HashMap with the inferred type.
//package com.book2s; import java.util.HashMap; public class Main { public static void main(String[] argv) { System.out.println(map()); }//from w ww . j a va 2 s .c om /** * Creates a new empty {@link HashMap} with the inferred type. */ public static <T1, T2> HashMap<T1, T2> map() { return new HashMap<T1, T2>(); } }