HashSet

what is HashSet?

Hashset comes under collection framework its used for storing group of data it uses hashtable for storing data.Its comes under set interface which is child interface of collection framework.

Important Points

1.It doesnt allow duplicate value if duplicate value inserted mean it will return false saying the value already inserted.

2.It allow null value.

3.It doesnt preserve insertion order since it use hascode for storing data.

4.Sometime its heterogeneous.

5.Hashset is best choice for searching since it use hascode().

Knowledge is everything.Check out my app at https://play.google.com/store/apps/details?id=com.vibe.britevibe

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Laravel introduction to Service Container — Part 1

Object.keys() || Object.values()

10 JavaScript coding challenges that you might face in Interview

A brief toe-dip into Three.js

How to get the query params from a URL in Next.js (2021)

How to automate open/closing hours in Webflow

Embed assets in a WordPress theme

How to implement PhoneBook using tries data structure.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pandiyan Mani

Pandiyan Mani

Knowledge is everything.Check out my app at https://play.google.com/store/apps/details?id=com.vibe.britevibe

More from Medium

How to Get Started as an Android Developer

Simple Way to Understand Kotlin Scope Functions — let, run, with, apply, also

TDD — Part II, MVVM (Android)

Leetcode: Valid Anagram (Kotlin)