Java Iterable vs Iterator tutorial and code

Java Iterable vs Iterator tutorial and code

Aaron Writes Code

8 лет назад

47,749 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@emanu9677
@emanu9677 - 14.11.2016 03:35

What's the point of declaring the internal list?

Edit: in other words, couldn't you just do something like this for the next method:

return (CustomArrayList.this.get(indexPosition++));

And therefore avoid writing a constructor?

?

Ответить
@michaelm4845
@michaelm4845 - 18.12.2016 17:46

I keep hearing you say "iterable" but the only thing I saw was "Iterator". Am I missing something??

Ответить
@fibber7062
@fibber7062 - 29.12.2016 10:35

Thank you! This was very helpful.

Ответить
@blabla686
@blabla686 - 29.03.2017 16:56

thank you so much, this video saved my ass!
i love you dude!

Ответить
@ylioo
@ylioo - 26.05.2017 15:32

this was a very disent tutorial. Do you have a tutorial on customizing the desktop enviorment?

Ответить
@Nabilliban14
@Nabilliban14 - 24.10.2017 06:53

Saved my butt for my exam tmr. thanks

Ответить
@360spider06
@360spider06 - 15.11.2017 04:24

lol my man is takin the key board out back and boxing the shit out of it other than this gr8 tut

Ответить
@SuperAdilMorocco
@SuperAdilMorocco - 14.01.2018 21:49

good job from germany thanks

Ответить
@johnbraganza9316
@johnbraganza9316 - 09.03.2018 18:34

what os are you using

Ответить
@conradlarrson6182
@conradlarrson6182 - 08.04.2018 02:56

Sweet, cleared things up for me. Thanks.

Ответить
@apoozeo1715
@apoozeo1715 - 08.04.2018 18:10

Thanks for the video. (I am sure I heard a train in the background! :))

Ответить
@seal3081
@seal3081 - 05.11.2018 16:07

ok and i guess you don't need a class to implement iterator if you only need the default next and hasNext behavior because the List class has it's own iterator() method that returns a Iterator. So in public Iterator<T> iterator() method you can just return MyList.iterator();

Ответить
@williamchisholm3562
@williamchisholm3562 - 14.02.2019 23:26

Great tutorial, very straight forward.

Ответить
@daloshy
@daloshy - 28.02.2019 18:50

thank you this was extremly clear, best video I found about this topic (:

Ответить
@abhilashkokkonda1713
@abhilashkokkonda1713 - 03.07.2019 13:50

Excellent

Ответить
@thestarinthesky_
@thestarinthesky_ - 19.10.2019 18:22

Thank you so much. I exactly have been looking for such video! I learned a lot.

Ответить
@thestarinthesky_
@thestarinthesky_ - 22.10.2019 00:42

I have watched this video several times and every time I learnt something new and existing, informative that I REALLY wanted to know. That's why I wanted to say thank again. Thank you so much teacher. You are THE BEST!

Ответить
@soldadopreciso
@soldadopreciso - 28.11.2019 17:59

thanks pal.

Ответить
@hacker-7214
@hacker-7214 - 23.02.2020 01:01

poor, why didnt u manually create the custom iterator object and use it instead of using for each loop. it defeats half the point of this video. other than that the video was aight. ty

Ответить
@esam5713
@esam5713 - 18.03.2020 02:04

Your are Amazing bro

Ответить
@eladesorviews6561
@eladesorviews6561 - 06.04.2020 03:17

Classes just went online and my cs professor decided now is a good time to give less direct answers than when we would meet face to face a few times a week. Her help to me not being able to understand why I couldn’t iterate through a generic arraylist using a for each loop but a regular for loop works fine was that it should work and if not I should be able to find a solution online. This was amazing ty

Ответить
@philipT8989
@philipT8989 - 06.09.2020 10:54

u say in the intro that u gonna keep talking about the collecation interface, where can i find that vid?

Ответить
@randy4443
@randy4443 - 18.10.2020 06:02

How would I iterate starting from last index to first index?

Ответить
@saurabhkumatkar6242
@saurabhkumatkar6242 - 23.11.2020 07:36

Somebody has well said "hands-on trial is way better than reading".
Great explanation 🔥🔥

Ответить
@sparkfx5874
@sparkfx5874 - 26.02.2021 09:53

Shouldn't the logic in hasNext be: " if ( internalList.size() > indexPosition + 1 ) " ?? And not " >= " ? If the size is also equal to the position + 1, that means we are at the end of the list, and there is no next element. Example : we have a list of two things, ["bob", "jane"]. The size would be 2. If we are at index 1 in Java, we are at the 2nd element ("jane"). If the "size" (2) is equal to "index + 1" (2) your code says that it hasNext or has another element, which isn't the case.

Ответить
@collinwilliams8475
@collinwilliams8475 - 22.09.2021 09:55

Thank you for the help! You made this concept click!

Ответить
@deli5777
@deli5777 - 10.01.2022 10:44

Hmm, I think it would be helpful if there was a simple description of what they are first. By your definition, there's an interface that has a method which is also an interface. ...see what I mean?

Ответить
@abrehamish
@abrehamish - 05.06.2022 23:40

Excellent presentation

Ответить
@Jtube0101Mega
@Jtube0101Mega - 15.10.2022 02:05

Great lesson! Thank you!

Ответить