Re: How to store in memory a tree like structure?
Posted By:
Nilanjan_Sengupta
Posted On:
Monday, July 7, 2003 01:05 PM
You can use hashtables for your situation.
Define the following hashtables -- countryHash and stateHash. countryHash has the key set as "USA" or "CANADA" or "UK". The value is stateHash. stateHash has the key set as "CA" or "VA" or "DC". The value is city. You can define a Static List object to populate the hashtables from the database. You can store these hashtables in the session.
Hope this helps.
thanks
Nilanjan