Friday, 30 January 2015

Java : Collection Framework : TreeMap (Key and value)


Click here to watch in Youtube : 
https://www.youtube.com/watch?v=lW6LMFO1DLA&list=UUhwKlOVR041tngjerWxVccw

TreeMapExample.java
import java.util.Set;
import java.util.TreeMap;

/*
 * Example of keySet() method.
 */
public class TreeMapExample
{
    public static void main( String[] args )
    {

        TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();

        treeMap.put(1, "Cat");
        treeMap.put(2, "Dog");
        treeMap.put(4, "Apple");
        treeMap.put(3, "Ball");

        System.out.println("treeMap : " + treeMap + "\n");

        /*
         * Returns a Set view of the keys contained in this map. The set is
         * backed by the map, so changes to the map are reflected in the set,
         * and vice-versa.
         * 
         * If the map is modified while an iteration over the set is in progress
         * (except through the iterator's own remove operation), the results of
         * the iteration are undefined. The set supports element removal, which
         * removes the corresponding mapping from the map, via the
         * Iterator.remove, Set.remove, removeAll, retainAll, and clear
         * operations. It does not support the add or addAll operations.
         */
        Set<Integer> set = treeMap.keySet();

        System.out.println("set : " + set + "\n");

        System.out.println("-----------------------");
        System.out.println("Key" + " | " + "value");
        System.out.println("-----------------------");

        for( Integer key : set )
        {
            String value = treeMap.get(key);
            System.out.println(key + "   |  " + value);

        }

    }
}
Output
treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}

set : [1, 2, 3, 4]

-----------------------
Key | value
-----------------------
1   |  Cat
2   |  Dog
3   |  Ball
4   |  Apple
To Download TreeMapDemoKeyandValue Project Click the below link
https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoKeyandValue.zip?attredirects=0&d=1

See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (KeySet)


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=lwa448Kf-NQ&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.Set;
    import java.util.TreeMap;
    
    /*
     * Example of keySet() method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap +"\n");
          
            /*
             * Returns a Set view of the keys contained in this map. The set is
             * backed by the map, so changes to the map are reflected in the set,
             * and vice-versa. 
             * 
             * If the map is modified while an iteration over the
             * set is in progress (except through the iterator's own remove
             * operation), the results of the iteration are undefined. The set
             * supports element removal, which removes the corresponding mapping
             * from the map, via the Iterator.remove, Set.remove, removeAll,
             * retainAll, and clear operations. It does not support the add or
             * addAll operations.
             */
            Set<Integer> set = treeMap.keySet();
    
            System.out.println("set : " + set + "\n");
    
            for( Integer key : set )
            {
                System.out.println(key);
            }
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    set : [1, 2, 3, 4]
    
    1
    2
    3
    4
    
    To Download TreeMapDemoKeySet Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoKeySet.zip?attredirects=0&d=1

    See also:

  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection : TreeMap Sample Programs or Examples - Playlist

    Java : Collection : TreeMap - Playlist

    Java : Collection Framework : TreeMap (Remove)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=gdPMgbzQMy8&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of remove(Object key) method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap + "\n");
    
            /*
             * Removes the mapping for this key from this TreeMap if present.
             * 
             * Returns: the previous value associated with key, or null if there was
             * no mapping for key. (A null return can also indicate that the map
             * previously associated null with key.)
             */
    
            String value = treeMap.remove(3);
    
            System.out.println("value : " + value + "\n");
            System.out.println("treeMap : " + treeMap + "\n");
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    value : Ball
    
    treeMap : {1=Cat, 2=Dog, 4=Apple}
    
    To Download TreeMapDemoRemove Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoRemove.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (PutReturn)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=HJ1ecY5MQw8&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of put(K key,V value) method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            /*
             * Associates the specified value with the specified key in this map. If
             * the map previously contained a mapping for the key, the old value is
             * replaced.
             * 
             * Returns: the previous value associated with key, or null if there was
             * no mapping for key. (A null return can also indicate that the map
             * previously associated null with key.)
             */
            String value = treeMap.put(1, "Apple");
    
            System.out.println("Previous value associated with key '1' : " + value);
            System.out.println("treeMap : " + treeMap + "\n");
    
            value = treeMap.put(1, "Ball");
    
            System.out.println("Previous value associated with key '1' : " + value);
            System.out.println("treeMap : " + treeMap);
    
        }
    }
    
    Output
    Previous value associated with key '1' : null
    treeMap : {1=Apple}
    
    Previous value associated with key '1' : Apple
    treeMap : {1=Ball}
    
    To Download TreeMapDemoPutReturn Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoPutReturn.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (PutAll)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=AHnX3bleK3U&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.HashMap;
    import java.util.TreeMap;
    
    /*
     * Example of putAll(Map<? extends K,? extends V> map) method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            HashMap<Integer, String> hashMap = new HashMap<Integer, String>();
    
            hashMap.put(1, "Cat");
            hashMap.put(2, "Dog");
            hashMap.put(4, "Apple");
            hashMap.put(3, "Ball");
    
            System.out.println("hashMap : " + hashMap + "\n");
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            /*
             * Copies all of the mappings from the specified map to this map. These
             * mappings replace any mappings that this map had for any of the keys
             * currently in the specified map.
             */
            treeMap.putAll(hashMap);
    
            System.out.println("treeMap : " + treeMap + "\n");
    
        }
    }
    
    Output
    hashMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    To Download TreeMapDemoPutAll Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoPutAll.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (Put)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=QqHhdViWIW0&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of put(K key,V value) method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            /*
             * Associates the specified value with the specified key in this map. If
             * the map previously contained a mapping for the key, the old value is
             * replaced.
             */
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap + "\n");
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    To Download TreeMapDemoPut Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoPut.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (Constructor Accepts Map)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=CjJJUHfZ1go&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.HashMap;
    import java.util.TreeMap;
    
    /*
     * Example of TreeMap(Map<? extends K,? extends V> m) Constructor.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            HashMap<Integer, String> hashMap = new HashMap<Integer, String>();
    
            hashMap.put(1, "Cat");
            hashMap.put(2, "Dog");
            hashMap.put(4, "Apple");
            hashMap.put(3, "Ball");
    
            System.out.println("hashMap : " + hashMap + "\n");
    
            /*
             * Constructs a new tree map containing the same mappings as the given
             * map, ordered according to the natural ordering of its keys. All keys
             * inserted into the new map must implement the Comparable interface.
             */
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>(hashMap);
            
            System.out.println("treeMap : " + treeMap + "\n");
    
        }
    }
    
    Output
    hashMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    To Download TreeMapDemoConsAcceptsMap Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoConsAcceptsMap.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (ContainsValue)


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=oRcsmVyR56g&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of containsValue(Object value) method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap +"\n");
    
            /*
             * Returns true if this map maps one or more keys to the specified
             * value.
             */
            boolean isValueExist = treeMap.containsValue("Ball");
    
            System.out.println("isValue 'Ball' Exist : " + isValueExist);
    
            isValueExist = treeMap.containsValue("Eagle");
    
            System.out.println("isValue 'Eagle' Exist : " + isValueExist);
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    isValue 'Ball' Exist : true
    isValue 'Eagle' Exist : false
    
    To Download TreeMapDemoContainsValue Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoContainsValue.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (ContainsKey)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=PSftLa7dmCY&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of containsKey(Object key) method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap +"\n");
    
            /*
             * Returns true if this map contains a mapping for the specified key.
             */
            boolean isKeyExist = treeMap.containsKey(2);
    
            System.out.println("isKey '2' Exist : " + isKeyExist);
    
            isKeyExist = treeMap.containsKey(8);
    
            System.out.println("isKey '8' Exist : " + isKeyExist);
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    isKey '2' Exist : true
    isKey '8' Exist : false
    
    To Download TreeMapDemoContainsKey Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoContainsKey.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (Get)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=VP537HT0rqw&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of get(Object key) method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap +"\n");
    
            /*
             * Returns the value to which the specified key is mapped, or null if
             * this map contains no mapping for the key.
             * 
             * A return value of null does not necessarily indicate that the map
             * contains no mapping for the key; it's also possible that the map
             * explicitly maps the key to null. The containsKey operation may be
             * used to distinguish these two cases.
             */
            String value = treeMap.get(2);
    
            System.out.println("value for the Key '2' : " + value);
    
            value = treeMap.get(10);
    
            System.out.println("value for the Key '10' : " + value);
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    value for the Key '2' : Dog
    value for the Key '10' : null
    
    To Download TreeMapDemoGet Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoGet.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (isEmpty)


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=onsB-crJPlo&index=11&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of isEmpty() method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            System.out.println("treeMap : " + treeMap);
    
            /*
             * Returns true if this map contains no key-value mappings.
             */
            boolean isEmpty = treeMap.isEmpty();
    
            System.out.println("isEmpty : " + isEmpty + "\n");
    
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap );
    
            isEmpty = treeMap.isEmpty();
    
            System.out.println("isEmpty : " + isEmpty);
    
        }
    }
    
    Output
    treeMap : {}
    isEmpty : true
    
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    isEmpty : false
    
    To Download TreeMapDemoIsEmpty Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoIsEmpty.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (Size)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=07r1TBdufbE&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of size() method.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap + "\n");
    
            /*
             * Returns the number of key-value mappings in this map.
             */
            int size = treeMap.size();
    
            System.out.println("size : " + size);
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    size : 4
    
    To Download TreeMapDemoSize Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoSize.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (Clear)


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=AI3jK_6cfiE&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of clear() method.
     */
    public class TreeMapExample
    {
        public static void main(String[] args)
        {
    
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            treeMap.put(1, "Cat");
            treeMap.put(2, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(3, "Ball");
    
            System.out.println("treeMap : " + treeMap + "\n");
    
            /*
             * Removes all of the mappings from this map. The map will be empty
             * after this call returns.
             */
            treeMap.clear();
    
            System.out.println("treeMap : " + treeMap);
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Dog, 3=Ball, 4=Apple}
    
    treeMap : {}
    
    To Download TreeMapDemoClear Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoClear.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : HashMap (Constructors Introduction)


    Click here to watch in Youtube :
    https://www.youtube.com/watch?v=_w0PnTqTcrc&list=UUhwKlOVR041tngjerWxVccw

    Click the below Image to Enlarge
    Java : Collection Framework : HashMap (Constructors Introduction) 

    Java : Collection Framework : HashMap (Constructors Introduction) 

    Java : Collection Framework : HashMap (Constructors Introduction) 

    Java : Collection Framework : HashMap (Constructors Introduction) 
    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : TreeMap (Default Constructor)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=rFwZRaSSJMI&list=UUhwKlOVR041tngjerWxVccw

    TreeMapExample.java
    import java.util.TreeMap;
    
    /*
     * Example of TreeMap() Constructor.
     */
    public class TreeMapExample
    {
        public static void main( String[] args )
        {
            /*
             * Constructs a new, empty tree map, using the natural ordering of its
             * keys. All keys inserted into the map must implement the Comparable
             * interface.
             */
            TreeMap<Integer, String> treeMap = new TreeMap<Integer, String>();
    
            treeMap.put(1, "Cat");
            treeMap.put(3, "Dog");
            treeMap.put(4, "Apple");
            treeMap.put(2, "Ball");
            
    
            System.out.println("treeMap : " + treeMap + "\n");
    
        }
    }
    
    Output
    treeMap : {1=Cat, 2=Ball, 3=Dog, 4=Apple}
    
    To Download TreeMapDemoDefaultCons Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/TreeMapDemoDefaultCons.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Java : Collection Framework : LinkedHashMap (EntrySet)


    Click here to watch in Youtube : 
    https://www.youtube.com/watch?v=M0ck7Ziy1fg&list=UUhwKlOVR041tngjerWxVccw

    LinkedHashMapExample.java
    import java.util.LinkedHashMap;
    import java.util.Map;
    import java.util.Set;
    
    /*
     * Example of entrySet() method.
     */
    public class LinkedHashMapExample
    {
        public static void main(String[] args)
        {
    
            LinkedHashMap<Integer, String> linkedHashMap = new LinkedHashMap<Integer, String>();
    
            linkedHashMap.put(1, "Apple");
            linkedHashMap.put(3, "Cat");
            linkedHashMap.put(2, "Ball");
    
            System.out.println("linkedHashMap : " + linkedHashMap + "\n");
    
            /*
             * A map entry (key-value pair).
             * 
             * Returns a Set view of the mappings contained in this map.
             */
            Set<Map.Entry<Integer, String>> entrySet = linkedHashMap.entrySet();
    
            System.out.println("entrySet : " + entrySet + "\n");
    
            System.out.println("-----------------------");
            System.out.println("Key" + " | " + "value");
            System.out.println("-----------------------");
    
            for (Map.Entry<Integer, String> entry : entrySet)
            {
                System.out.println(entry.getKey() + "   | " + entry.getValue());
            }
    
        }
    }
    
    Output
    linkedHashMap : {1=Apple, 3=Cat, 2=Ball}
    
    entrySet : [1=Apple, 3=Cat, 2=Ball]
    
    -----------------------
    Key | value
    -----------------------
    1   | Apple
    3   | Cat
    2   | Ball
    
    To Download LinkedHashMapDemoEntrySet Project Click the below link
    https://sites.google.com/site/javaee4321/java-collections/LinkedHashMapDemoEntrySet.zip?attredirects=0&d=1

    See also:
  • All JavaEE Viedos Playlist
  • All JavaEE Viedos
  • Servlets Tutorial
  • All Design Patterns Links
  • JDBC Tutorial
  • Google+ Followers

    Google+ Badge