Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
![]() |
hashmapSubmitted by alpesh.prajapati00 on Tue, 03/29/2011 - 18:11how to compare hashmap with single character,,,...!!!!
|
![]() |
javaSubmitted by manuram on Mon, 03/14/2011 - 09:14i want to override two methods from hashmap class to their extended class
|
![]() |
HashMap nad MethodsSubmitted by chris_lab on Thu, 02/03/2011 - 19:46Hi I have a file customer.txt and it contains details of the customer.
in my programme i have an abstract class caled Customer which is extended by two subclasses OnlineCustomer and IndoorCustomer. What i need to do is read the content of the file and store it in a HashMap. i need to use a method as the value of the HashMap something like |
![]() |
Java HashMap ExampleSubmitted by Andr on Wed, 11/03/2010 - 15:42 (5 votes)
|
![]() |
Java HashMap Java Hashtable DifferenceSubmitted by Andr on Thu, 10/28/2010 - 00:10 (2 votes) 1) Hashtable does not permit null keys while HashMap allows both null keys and values. 2) Hashtable is synchronized, while HashMap is not. If we need to synchronize it, we have to do it externally. 3) HashMaps work with Iterators where the older Hashtables work with Enumerations |
![]() |
Java HashMap OperationsSubmitted by Andr on Thu, 10/28/2010 - 00:07 (5 votes) void putAll(Map map) Copies all mappings from the map to current HashMap and replaces existing entries, if any. Void clear() Removes all mappings from HashMap. Collection values() Returns collection of the values contained in the HashMap. Set entrySet() |
![]() |
Java HashMap MethodsSubmitted by Andr on Thu, 10/28/2010 - 00:04 (2 votes) Object get (Object key) Returns the value mapped to the specified key, or null if no entry is found. Object put (Object key, Object value) |
![]() |
HashMap ConstructorSubmitted by Andr on Thu, 10/28/2010 - 00:02HashMap () Constructs empty HashMap with a default initial capacity 11 and load factor 0.75. HashMap (int initialCapacity) Constructs empty HashMap with the specified initial capacity and default load factor 0.75. HashMap (int initialCapacity, float loadFactor) |
![]() |
HashMap, Java HashMap TutorialSubmitted by Andr on Thu, 10/28/2010 - 00:00 (6 votes) A collection allows a group of objects to be treated as a single unit. Map is one of the core interfaces of java collection framework that defines operations for maintaining mappings of keys to values. |
|
|
Hashmap get keySubmitted by Steven on Sat, 09/18/2010 - 17:00How to get key from hashmap object? I have a hashmap which contains key value pairs and I want to get a particular key from my object. Is it possible to get key from Hashmap object?
(1 vote) |



