943,987 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 435
  • Java RSS
Jun 14th, 2009
0

Hash Tables & Files

Expand Post »
hi everyone
Im working on a program that includes hash tables and files.
What i'm doing is that I save the information (Name, Student ID, Address, Phone No.) of some students in a text file.
I use a hash table to work on the students' information.
Things like showing the information of a particular student or deleting their info or.....
My question is, I have used a usual implementaion of HashTable (with map) so far....but i feel that it wouldn't work
Do you think that I should use SerializableHash to be able to edit the contents of the text file?
I'm a bit lost here......How can i be able to access the contents of the file and have them as Hash Table?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
scream2ice is offline Offline
33 posts
since Mar 2008
Jun 14th, 2009
0

Re: Hash Tables & Files

You'll probably have to read the file into the table when the app starts, and re-write the edited data back at the end. You can do direct-access in-place updates of a file, but it's not easy or particularly safe - not recommended.
Where does the map come into it?
Featured Poster
Reputation Points: 1924
Solved Threads: 952
Posting Expert
JamesCherrill is online now Online
5,790 posts
since Apr 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: thread question
Next Thread in Java Forum Timeline: Can't see variable outside the method





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC