❮ Previous Next ❯

LinkedHashSet:

Let's see a simple demo program on LinkedHashSet.

LinkedHashSetDemo.java:

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

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

❮ 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