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

Calling the function, You may call function from any other place into your ...

You may call function from any other place into your JavaScript code. After the function is executed, the control goes back to other script which called it.  alert('Example 1: t

Explain about the dynamic java, Dynamic JAVA Class and type informatio...

Dynamic JAVA Class and type information is kept around at runtime. This allows runtime loading and inspection of code in a very flexible way.

Midlet game, do you have example of a simple midlet game ?

do you have example of a simple midlet game ?

Roster entries in chat application, The roster lets you keep track of the a...

The roster lets you keep track of the availability ("presence") of other users. A roster also allows you to organize users into groups such as "Friends" and "Co-workers". Other IM

PatternPrinter , The method should printout line numbers from 1 to howmany ...

The method should printout line numbers from 1 to howmany in the previous format -ONLY WHEN is divisble by 3 but is should not oupt more then 3 numbers on the line. input 1 outpu

Explain what is orm, Object Relational Mapping , its a tool for transaction...

Object Relational Mapping , its a tool for transaction management that requires to be integrated with Spring, Struts etc.Eg : Hibernate, i Batis,JDO etc

What does the keyword "synchronize" mean in java, What does the keyword " s...

What does the keyword " synchronize " mean in java. What are the usage and disadvantages of synchronization?

What is java rmi, Remote Method Invocation (RMI) is the process of activati...

Remote Method Invocation (RMI) is the process of activating a method on a remotely running object. RMI offers location transparency in the sense that it gives the feel that a metho

Multidimensional Array and the ArrayList Class, Write a ComputerPart class ...

Write a ComputerPart class and a ComputerKit class and a client class to test them. The ComputerPart class has two variables: a String representing an item, and a double representi

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