Is HashMap a Collection class? - ProProfs Discuss
Advertisement

Is HashMap a Collection class?



Asked by , Last updated: Mar 21, 2024

+ Answer
Request
Question menu
Vote up Vote down

3 Answers

Chris Evins

Chris Evins

Want to explore the world.

Chris Evins
Chris Evins, College Student, Schooling, Wolverhampton

Answered Dec 02, 2019

The correct answer to this question is True. In Java, HashMap is a collection class that is map-based. It is used for storing value pairs and strong keys. This collection is denoted as HashMap.

It can also be denoted as HashMap. HashMap includes a number of methods. One is the boolean containsKey(Object key). This method is a boolean function, and it can return either true or false.

The return depends on the key that is specified in the map. Another HashMap method is boolean isEmpty(), which sees if the map is empty or not. If it is empty, the return will be true.

upvote downvote
Reply 

John Adney

John Adney

John Adney
John Adney

Answered Jun 01, 2017

HashMap is not a Collection class. It is Collection framework class.
upvote downvote
Reply 

John Smith

John Smith

John Smith
John Smith

Answered Jun 01, 2017

True
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.