Hashtable or what ?
I need to store several key values with 3 values each. Whay kind of data structure can i use in java ?
Since I'll add, change, search in values with keys i need a flexible structure.
i.e.
[ "John", 1.45, 90
"Mark", 2.65, 89
"Mary", 1.10, 50
....
]
thanks,
Yigit
[327 byte] By [
Philaphia] at [2007-10-3 3:29:59]

three values that are related? looks like a name, height and weight in metric units.since java is an object-oriented language, I'd recommend that you combine these related things into a sensible object.you know that Map is <key, value> - that's it.%
> There are several reasons for that.Not any good ones that I can think of. :o)~"Yes, I realize my code is a metric rump-ton of schlabbadang, but hey - I tucked all away behind this here fa鏰de..."
Yeah, classes are lame - I'd use an array:Object[] stuff = new Object[] {"Jim",138,68,"Billy",172,45};
> > There are several reasons for that.> > Not any good ones that I can think of. :o)> I can think of one, but someone needing to ask this kind of question would not have the expertise to work on systems with that kind of requirements.
> I can think of one, but someone needing to ask this
> kind of question would not have the expertise to work
> on systems with that kind of requirements.
Myself included. :o)
Those types of restrictions just don't come into play in my arena. But I hear you; I can think of a situation or two where it could be a consideration, but not one that would be discussed in the "New To Java" section... :o)
~