HashTable and Memory

foongkim2
foongkim2 used Ask the Experts™
on
Guys, I was wondering how is this "HashTable" under Java.util API works.

Is it required memory to store the data inside the hashtable or using hard-disk ?

I have this issues because I am not sure either will it cause me a problem if i am going to put hastable under some of the programs which will going to used by almost 20 ppl.

Is it each user, each time call this programs, will stored one set of the memory?? Or ony one set of hast table in server only.

I have checked the below JavaDoc, didn't explain how it works.

http://java.sun.com/j2se/1.3/docs/api/java/util/Hashtable.html

Thankyou.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Java Developer
Top Expert 2010
Commented:
The Hashtable itself does require some memory but typically the amount will be insignificant in relation the memory used by the actual objects being stored in the Hashtable.

Author

Commented:
Object... u are talking to dummy now lah... ha....

What does that mean??
for example, I have 10 user accessing the files simutaneously, so my server will hold 10 hashtable or is it each user got one each individual table hold in server??

I read the javadocs, but seems didn't explain very clearly.
Mick BarryJava Developer
Top Expert 2010

Commented:

> for example, I have 10 user accessing the files
> simutaneously, so my server will hold 10 hashtable or is
> it each user got one each individual table hold in server??

What particular Hashtable are you referring to here.
If you are creating the Hashtable then you decide whether one exists for each user.
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Author

Commented:
Let say for example my previous problems regarding the duplicate data.

Previously I was thinking store my data, each data when user keyin to hastable, and from there I perform some comparison. If exits, then prompt error message.

So, that's what come in my mind that is it hashtable will hold each individual user when they key in their records.
Mick BarryJava Developer
Top Expert 2010

Commented:
Sounds like you would be storing the hashtable in the session so their would be one Hashtable object per user session.

Author

Commented:
Oh....
Oklah... Object, going back now. In Malaysia today is Christmas Eve...so..

Merry Chritsmas toyou....

Thanks a lot for your effort on helping  me...

Thank you.
 
Mick BarryJava Developer
Top Expert 2010

Commented:
Hope you and your family had a nice xmas :)
Thx 4 the pts.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial