Explain the both hashset and treeset, JAVA Programming

Assignment Help:

Explain the both HashSet and TreeSet?

HashSet is an unordered, unsorted Set.

It's a Collection set which restrict duplicate elements and also repositioning of elements.

It implements Set interface and extends AbstractSet.

Uses hash code of object being inserted.

TreeSet is a Set implemented when we want elements in a sorted order.

Sorting of element is done according to natural order of elements or by help of comparator provided at creation time.

 


Related Discussions:- Explain the both hashset and treeset

Prepare a game in corona for android and ios, Prepare a Game in Corona for ...

Prepare a Game in Corona for Android and IOS Project Description: We want to develop a game for mobile platform same as Zombie Smasher for iOS and Android. Everything is r

I need integrate template to java system, I need integrate template to Java...

I need integrate template to Java system Project Description: We have around 60 files for a java backend and want to implement a template, the system is complete it requires

Basic difference between equals and identity method, The == gives true, i...

The == gives true, if the variable reference points to the similar types of object in memory. That is a " shallow comparison ".   The equals () - gives the results of run

I need basic mobile app, Project Description: Android app for particular...

Project Description: Android app for particular needs children Provide the fonts, layouts and images of the app. Functions: home screen: main page that links to 'login'

File handling operation, Write a program called Drivers that displays infor...

Write a program called Drivers that displays information about Formula 1 drivers and their teams.     The program starts by prompting (asking) the user for the name of an input tex

Describe in brief about the polymorphism, Describe Polymorphism? Polymo...

Describe Polymorphism? Polymorphism can be referred as one name many forms. It's the ability of methods to behave differently, depending upon object who is calling it. Key feat

Method over ridding method in java, Q. Write short on the method over riddi...

Q. Write short on the method over ridding method in java? Ans. Method over ridding and dynamic binding: We have seen that a method in a super class is inherited by its subclass

I clicker, i am to find 75% of i clicker score.Each correct answer is worth...

i am to find 75% of i clicker score.Each correct answer is worth 2points and an incorrect 1point. Express grade as a percentage (i.e the max is 100%). e.g 1 no i clicker question

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