❮ Previous Next ❯

Set :

HashSet

Constructors

Hash Set Demo.java:

import java.util.*;
class HashSetDemo
{
public static void main(String args[])
{
HashSet h=new HashSet();
h.add("Gourav");
h.add("Abhisek");
h.add("Lagnika");
h.add("Priti");
h.add("Suman");
h.add("Sonali");
h.add(null);
h.add(25);
System.out.println(h.add("Gourav"));
System.out.println(h);
}
}
Output

false
[null, Sonali, Lagnika, Priti, 25, Suman, Abhisek, Gourav]

❮ Previous Next ❯










  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved