import java.util.*;
public class LinkedHashSetDemo
{
public static void main(String args[])
{
LinkedHashSet<String> lhs = new LinkedHashSet<String>();
System.out.println("Initial size of LinkedHashSet: "+lhs.size());
System.out.println("LinkedHashSet is empty: "+lhs.isEmpty());
//adding the element
lhs.add("Mango");
lhs.add("Orange");
lhs.add("Grapes");
lhs.add("Banana");
lhs.add("Orange");
lhs.add(null);
lhs.add(null);
//retrieving the element
System.out.println("Elemnts in LinkedHashSet:"+lhs);
System.out.println("Size of the LinkedHashSet:"+lhs.size());
//delete the elements
lhs.remove("Orange");
System.out.println("Elemnts in LinkedHashSet:"+lhs);
System.out.println("LinkedHashSet is empty: "+lhs.isEmpty());
}
}