Question: The implementations of the methods addAll, removeAll, retainAll, toArray(), and toArray(T[]) are omitted in the MyHashSet class. Implement these methods. Also add a new constructor

The implementations of the methods addAll, removeAll, retainAll, toArray(), and toArray(T[]) are omitted in the MyHashSet class. Implement these methods. Also add a new constructor MyHashSet(E[] list) in the MyHashSet class. Test your new MyHashSet class using the code at https://liveexample.pearsoncmg.com/test/Exercise27_11.txt.

Step by Step Solution

3.47 Rating (186 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautil public class Exercise2711 public static void mainString args new Exercise2711 public Exercise2711 String name1 Tom George Peter Jean Jane String name2 Tom George Michael Michelle Danie... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Java Programming and Data Structure Questions!