In my class the professor was showing us a "Bag" program that he was writing and it was a collection. He told us that a way to be able to iterate the Bag program was to put a subclass called...
Type: Posts; User: jean28
In my class the professor was showing us a "Bag" program that he was writing and it was a collection. He told us that a way to be able to iterate the Bag program was to put a subclass called...
So I will always need to implement the iterator interface if I am making my own collection?
I am a bit new to for each loops and I'm trying to understand what are the main differences between them when working with arrays. Is there any particular set where the for each is more convenient?...