3:59 am - Monday February 20, 2017

Hashset example programs and Tutorial in java

Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044


1.Add elements to HashSet using boolean add(E e)

2.Remove elements from Hashset using  boolean remove(Object o)

3.check whether  Hashset is empty using boolean isEmpty()

4.Get size of Hashset using  int size()

5.check whether a value is present in Hashset boolean contains(Object value)

6.Clear elements from Hashset using void clear()

7.Create a copy of Hashset Object clone()

8.Copy all elements from Hashset to an array toArray()

9.Iterate all elements in Hashset using Iterator()

10.HashSet to remove specfic element on output using Remove() method

11.HashSet  to using find Max and Min Number using Max() and Min() Method

12.HashSet  to use copy of another object Clone() method

13. To find size of element HashSet Size() method

14.  clear the Element using HashSet Clear() method

15. returns the empty set (immutable) emptySet() method


Filed in: Java Examples

Comments are closed.