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