Define when to use hashmap and when to use treemap, JAVA Programming

Assignment Help:

How do you decide when to use HashMap and when to use TreeMap?

When we want to perform deletion, insertion and locate elements in a Map then HashMap is used.

Whereas TreeMap is used when we want to traverse elements in a sorted order. Depending upon size of collection, adding elements to HashMap is easy. But for sorted elements traversal we can convert HashMap into TreeMap.

 


Related Discussions:- Define when to use hashmap and when to use treemap

Banking database system - java database connectivity, JDBC Assignment B...

JDBC Assignment Banking Database System:  BankCustomer CUST_ID  CUST_NAME ADDRESS ACC_TYPE CUST_ID

Design patterns which are used in struts , Struts is depend on m...

Struts is depend on model 2 MVC (Model-View-Controller) architecture. Struts controller uses the command design pattern and the action classes use the adapter design pattern. The p

Why hub is used in networks, Why hub is used in networks? Hub is networ...

Why hub is used in networks? Hub is networking equipment and a device that connects various computers to form a network. In a network the NIC translates the message within elec

What is the use of throws keyword, What is the use of throws keyword ? ...

What is the use of throws keyword ? Rather than explicitly catching an exception you can declare in which your method throws the exception. This passes the repsonsibility to h

Explain about core java, Java is increasingly used for middleware applicati...

Java is increasingly used for middleware applications to communicate among Server and clients. Java has features like multithreading, portability and networking capabilities. Chang

Retrieving file records randomly, how to retrieve multiple records randomly...

how to retrieve multiple records randomly from a file and store it in another file

Data Structures Projects, I have three data structures projects that I need...

I have three data structures projects that I need help with.

A service locator, J2EE prepares use of the JNDI interface to access differ...

J2EE prepares use of the JNDI interface to access different resources like JMS, JDBC, EJB etc. The client finds up for these resources through the JNDI look-up. The JNDI look like

Need to modify joomla component, Project Description: I want to modify J...

Project Description: I want to modify Joomla component. Now there is Akeeba subscription component on this site. It works and the whole thing is fine, but there is no "teaser

List down the analytical engine''s elements name, List down the Analytical ...

List down the Analytical Engine's elements name An analytical engine elements are as follows: Input Memory Processor Output.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd