Java examples for java.util:Collection Creation
Create new Hashtable
//package com.java2s; import java.util.Hashtable; import java.util.Map; public class Main { public static void main(String[] argv) { System.out.println(newHashtable()); }//ww w . ja v a 2s .c o m public static <K, V> Hashtable<K, V> newHashtable() { return new Hashtable<K, V>(); } public static <K, V> Hashtable<K, V> newHashtable( final int initialCapacity) { return new Hashtable<K, V>(initialCapacity); } public static <K, V> Hashtable<K, V> newHashtable( final int initialCapacity, final float loadFactor) { return new Hashtable<K, V>(initialCapacity, loadFactor); } public static <K, V> Hashtable<K, V> newHashtable( final Map<? extends K, ? extends V> m) { return new Hashtable<K, V>(m); } }