public class TestMyHashSet {
public static void main(String[] args) {
java.util.Collection<String> set = new MyHashSet<>();
set.add("Perez");
set.add("Anderson");
set.add("Lewis");
set.add("Cook");
set.add("Perez");
System.out.println("Elements in set: " + set);
System.out.println("Number of elements in set: " + set.size());
System.out.println("Is Perez in set? " + set.contains("Perez"));
set.remove("Perez");
System.out.print("Names in set in uppercase are ");
for (String s: set)
System.out.print(s.toUpperCase() + " ");
set.clear();
System.out.println("\nElements in set: " + set);
}
}