• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Difference between Hashmap in java and dictionary object in other programming language ?  RSS feed

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are Hashmap in java similar to dictionary object in programming language
 
Marshal
Posts: 60136
188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go through the Java™ Tutorials and the documentation for Map and HashMap and you will find out
 
Saloon Keeper
Posts: 1844
80
Android Chrome IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I may @narayan lakshmis. By "other programming language" which exactly do you mean? Some languages may in fact support/implement Hashmap just like Java does while other may not support this at all. Perhaps a with a little more context you will find the answer to your question.

Are you looking into transferring skills from C#, PHP or some other programming language to Java? I'm fairly certain that there are tutorials and books for programmers coming from C#, PHP, Python, C++ and more who wish to learn Java.
 
Bartender
Posts: 2038
273
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

narayan lakshmis wrote:...similar to dictionary object in programming language


Do you mean an ASP VB Dictionary Object?
 
narayan lakshmis
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right .I have used Dictionary object in vb script.I want to use the same concept in java .
 
Bartender
Posts: 19731
92
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Technically, a "dictionary" in Java is a Map. HashMap is an implementation of Map that uses a hash table to optimize searches. Other architectures are also possible, such organizing entries via a tree of keys (TreeMap) and even user-defined extensions where, for example, the elements might actually live on a database server or web service.

Map is the abstract interface for a dictionary and that allow you to swap out different implementations as you need. Most languages with built-in dictionaries tend to have the dictionary interface and its implementation be the same thing. But it very much depends on how the language has been implemented.
 
Saloon Keeper
Posts: 9239
177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java's equivalent would be LinkedHashMap. I don't know if VBScript uses a true hash table implementation, or simply a linked list of key-value pairs.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!