Implementing a Custom Iterator in Java

preview_player
Показать описание

In this video you'll learn how to use the Iterable and Iterator interfaces to create your own custom code to iterate through a collection.

Рекомендации по теме
Комментарии
Автор

Thank you for the info!  I am learning this in data structures now and still learning the logic for how to move different nodes around and iterate them via custom iterator code.  It is also very helpful that you show how to create/run/debug tests.

bigfreize
Автор

Good explanation of custom iterator. Thanks a lot

laxminarayankatker
Автор

This was crazily helpful - thanks for sharing your experiences :)

trainingbruddha
Автор

In your next() method wont you print out the head twice while traversing?

uri_
Автор

6:20 what happend here? what dod u press?

philipT
Автор

Would this also work if you need to implement hasPrevious as well?

odalisflores
Автор

Thank you thank you thank you thank you. Subscribed!!!.

Dani-kqqq
Автор

And after doing all that, you can use the for-each-loop in your main class, in this case LinkedList, right?

arnoclaude
Автор

my mind shuts off. i wish they would name one iterator and the other something else.

brian
Автор

Doesn't use inline curly braces, thumbs down, not a real programmer ;)

benjaminrogers