package devmanuals.com; import java.util.*; public class SizeOfHashSet { public static void main(String[] args) { HashSet hst = new HashSet(); hst.add("Gyan"); hst.add("Rohit"); hst.add("Anand"); hst.add("Arunesh"); System.out.println("The size of the HashSet is : "+hst.size()); } }