• Post Reply Bookmark Topic Watch Topic
  • New Topic

HashTable Problem  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to store and retrive a structure which contains many members. from Hash Table ...how to retrive a whole structure and individual members too....
 
Java Cowboy
Sheriff
Posts: 16084
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, forget about class Hashtable. Use class HashMap instead. Hashtable is an old, legacy collection class that has been replaced by HashMap.

You can choose any type you like for the keys and values of a HashMap. The type that you use for the keys has to have an appropriate implementation of the equals and hashCode methods. Here is an example where the keys are strings and the values are Person objects.

 
gangs sandrani
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks dude
 
You have to be odd to be #1 - Seuss. An odd little ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!