This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Collection - HashMap ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Collection - HashMap ?" Watch "Collection - HashMap ?" New topic
Author

Collection - HashMap ?

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1372
How to store all three arrays(String array, float array and int array) as HashMaps values ? (or) three different lists instead of arrays. Any other effiient way to return all 3 array values ?

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Why not making a class called Employee, with a name, a salary and an age ? You could then instanciate each employee from the resultset, put it in a List<Employee> and return it. I don't think you need to use HashMap here.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Collection - HashMap ?
 
Similar Threads
Sort Arraylist by passing runtime parameter
MultiDimenaional Array sort
can constructor throw exceptions?
HashMap dilemma
HashTable Problem