HashSet h=new HashSet();
HashSet h=new HashSet(int initial capacity);
HashSet h=new HashSet(int initial capacity, float load factor);
HashSet h=new HashSet(Collection c);
import java.util.*; class HashSetDemo { public static void main(String[] args) { HashSet h=new HashSet(); h.add("Dibya"); h.add("Dibakar"); h.add("Jyoti"); h.add("Renuka"); System.out.println(h.add("Dibya")); System.out.println(h); Iterator it=h.iterator(); while(it.hasNext()) { System.out.println(it.next()); } } }
Output
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc