Add to Chrome
✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
What is wrong with this implementation of the next() in the CompositeIterator class.
The iterator of component is not pushed.
The iterator must be returned instead of the component.
The pop() method should be used instead of peek().
The else statement should return component.next() instead of null.
Nothing is wrong.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!