Question: Add an iterator to the HashSet class written in this chapter. To do this you will need to write an inner class that can iterate
Add an iterator to the HashSet class written in this chapter. To do this you will need to write an inner class that can iterate over the elements of the set, remembering its position as it moves along. Also write a method in the HashSet class called iterator that returns such an iterator object.
Step by Step Solution
3.28 Rating (160 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
