Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > JAVA Technologies
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 23-02-07, 01:33 PM   #1 (permalink)
Senior Member
 
Join Date: Aug 2006
Age: 28
Posts: 275
Thanks: 0
Thanked 5 Times in 5 Posts
Thanks: 0
Thanked 5 Times in 5 Posts
Rep Power: 5 radhika743 is on a distinguished road
Methods in TREEMAP?

Q.) How to ascend or descend the elements in Tree Map?

Q.) What is the advantage of TreeMap Over Hash Map?
radhika743 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 23-02-07, 04:03 PM   #2 (permalink)
Member
 
Join Date: Jan 2007
Posts: 32
Thanks: 3
Thanked 3 Times in 3 Posts
Thanks: 3
Thanked 3 Times in 3 Posts
Rep Power: 2 Laxminarayanak will become famous soon enough
Re: Methods in TREEMAP?

Q.) What is the advantage of TreeMap Over Hash Map?
TreeMap is used when the keys should preserve some order. And the Hash Map is used when there is no need of preserving the order.
similarities
Hash Map and Tree Map both are not synchronized.
Both implements Abstract Map

Q.) How to ascend or descend the elements in Tree Map?
A) two ways of this
1.Firt one is implement the our own comparitor so that it will put the keys in the order which we want
2. Get the key set and use the external sorting of the keys by sorting the key set it self and retrive the values.
__________________
Cheers,
Laxmi
Laxminarayanak is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
J2EE - What is the class containing all the methods as static? preethisingh Java Interview / Technical Questions 3 03-10-07 06:48 PM
J2EE - Why are the methods of the Math class static? preethisingh Java Interview / Technical Questions 0 23-01-07 07:00 PM
J2EE - Isn't it redundant to have to mark the methods final if the class is final? preethisingh Java Interview / Technical Questions 0 23-01-07 03:05 PM
J2EE - What are native methods? How do you use them? preethisingh Java Interview / Technical Questions 0 23-01-07 03:02 PM
java JSP naga JAVA Technologies 4 21-08-06 05:03 PM


All times are GMT +6.5. The time now is 01:54 PM.





Search Engine Optimization by vBSEO 3.1.0