Home Discussion Discuss: Java HashSet  - Java Tutorials

  • DetailsSudhakar September 2, 2011 at 4:57 PM

    A HashSet is a collection set that neither allows duplicate elements nor order or position its elements. This class implements the Set interface and extends AbstractSet. It creates a collection that uses a hash table for storage. Hash table stores information by using a mechanism called hashing. In hashing, the informational content of a key is used to determine a unique value, called its hash code. The hash code is then used as an index at which the data associated with the key is stored. The transformation of key into its hash code is performed automatically.HashSet is not synchronized. It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time. This class permits the null element.

  • hash setsarath October 28, 2011 at 6:51 PM

    In the printing of "hash list" .. why the list is in reverse order? based on what it is displaying????

  • Runtime of Collection interfaceEd Shihabeddin November 5, 2012 at 4:25 AM

    What is the runtime for a Hashset add method? get method? What about for a TreeMap?

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Java-Tutorials

Collection : HashSet Example
Collection : HashSet Example This tutorial contains description of HashSet with example. HashSet  : HashSet class extends AbstractSet class... time. It does not allow duplicate value. HashSet does not provide any its own 

Core Java

How to remove all element from Hashset.
How to remove all element from Hashset. HashSet is set type Collection...; it .In this example, you will see the use of clear method of HashSet. It is used to remove all element of hashset. Code:  HashSetRemoveElement.java 

Core Java

How to remove specific element from Hashset.
How to remove specific element from Hashset. In this  exmple, you will see how to remove specific element from hashset. The HashSet class provides...[] arg) { HashSet obHashSet = new HashSet(); obHashSet.add("Bharat" 

Java Interview Questions

write a program to remove the element from hashset using keyboard.
write a program to remove the element from hashset using keyboard.  write a program to remove the element from hashset using keyboard 

EJB Questions

tutorials - EJB
ejb tutorial for beginners free  Can anyone give me the reference of EJB tutorials for beginners 

Design concepts & design patterns Questions

Photoshop tutorials
Photoshop tutorials  Hi, Where to learn Photoshop? Thanks   Hello, Check Photoshop tutorials home page. Thanks 

Photoshop Tutorials

Photoshop - Photoshop Tutorials
Photoshop - Photoshop Tutorials 

JSP-Tutorials

JSP Tutorials - Page 3
JSP Tutorials - Page 3 

Ajax Questions

Ajax tutorials
 

Java Interview Questions

write aprogram which shows the use of hashset and iterator (through enter the value through keyboard )
write aprogram which shows the use of hashset and iterator (through enter the value through keyboard )  write aprogram which shows the use of hashset and iterator (through enter the value through keyboard 

Programming Tutorials

JSP Tutorials
 

Submit-Tutorials

Submit Tutorials - Submitting Tutorials at RoseIndia.net
Submit Tutorials       Submitting Tutorials at RoseIndia.net is very easy. We welcome all members to submit their tutorials at RoseIndia.net. We are big tutorial web site 

PHP Questions

Learn PHP Tutorials for Beginners
Learn PHP Tutorials for Beginners  Hi, I am just pass-out from college and eager to learn the PHP. Can anyone suggest or provide me a resourceful information for php beginners. Thanks 

PHP Questions

PHP Tutorials Guide with Examples
PHP Tutorials Guide with Examples  Hi, I am a beginners in PHP. I have searching for php tutorial guides with examples. Can any one provide me resourceful link. Thanks,   Hi, Please read this PHP tutorial 

Programming Tutorials

E-mail Tutorials
E-mail Tutorials       Sending an email in JSP In this section, you will learn how to send 

C++

C Tutorials
C Tutorials       In this section we have given large number of tutorials on C... will be needing a C compiler on your machine. Here are the tutorials of C 

Software Development

HTML5 Tutorials
HTML 5 Tutorials In this section we have listed the tutorials of HTML 5... HTML5 tutorials. Here are some of the best HTML 5 tutorials: HTML5 Tutorials HTML 5 Introduction Here you will learn 

WebSevices Questions

Web Services Tutorials
 

Ajax Questions

Ajax programming tutorials
 

UML Questions

UML TUTORIALS - UML
 

jQuery

jQuery Tutorials, jQuery Tutorial
jQuery Tutorials, jQuery Tutorial The jQuery tutorials listed here will help... to understand examples to making learning path easier. These jQuery tutorials.... In our jQuery tutorials we have covered following topics: Getting 

General

Bioinformatics Tutorials, Links, Programs
Bioinformatics Tutorials      ... Tools, Online Resource, Links to Bioinformatic Resources and Tutorials. Here you will find a lot of tutorials and information about the Bioinformatics 

iPhone

iPad Tutorials
 

iPhone

iPhone Tutorials
 

Blog

Roseindia Ajax- Roseindia Ajax tutorials
Roseindia Ajax- Roseindia Ajax tutorials Learn ajax at roseindia.net website. We are providing complete tutorial on Ajax. RoseIndia Ajax Tutorials is very compact and easy to learn and understand. RoseIndia Ajax Tutorials Ajax 

Ajax Examples

jQuery - jQuery Tutorials and examples
jQuery - jQuery Tutorials and examples   ... and jQuery Tutorials on the web. Learn and master jQuery from scratch. jQuery is nice... to develop highly interactive web applications. In this jQuery tutorials series we 

Ajax Examples

jQuery - jQuery Tutorials and examples
 

Struts 2 Tutorials

Struts 2.3.8 Tutorials and Examples
Struts 2.3.8 is another best release with performance improvements and new version of OGNL (OGNL version 3.0.6). In this page we are giving many tutorials and examples of Struts 2.3.8. Struts 2.3.8 is  "General 

SQL Tutorial

SQL Example, Codes and Tutorials
 

Tutorials

iPhone SDK Tutorials and Examples
The best collection of iPhone development tutorials and examples specially developed to learn iPhone SDK programming easily. These iPhone SDK tutorials are useful for both novice and experienced developers. In this iPhone tutorials series 

DMCA.com