Learn Java Tutorial for Beginners, Part 31: Generics and Wildcards

preview_player
Показать описание
-------------------------------------------------------------------------------------------------------------------------------------------
This is a tutorial on using the wildcard with generics in Java; a useful but quite advanced technique.
--------------------------------------------------------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

For those who dont get the loop :
for(String value : list ){
System.out.println(value);
}
This is a for-each statement . that's eqiuvalant to this :
for (int i= 0; i< list.size();i++) {
String value = list.get(i);
System.out.println(value);
}
Please upvote to avoid questions .Thanks for the tutorial :)

nickosmark
Автор

It's covered in my video "Java for Complete Beginners, Part 11: Arrays of Strings" ... this covers arrays, but actually it works for most collections. Sorry about hissy hifi sound in this video ...

caveofprogramming
Автор

thanks for the quick reply john. i did the whole thing over from scratch in another java project and it worked fine. i think my eclipse was bugging out for some reason. Love the tutorials, your tutorials are the best on the net. Much respect

visheshkumar
Автор

I forgot to say, I've got a video on Iterable coming out hopefully soon ... this will explain how this kind of for loop works behind the scenes too ...

caveofprogramming
Автор

this one is the greatest java video ever

Thegamer-ypqq
Автор

Oh the fun I am going to have with this, my first time coming across type parameter wildcard bounds.

My sincere gratitude

seandougan
Автор

Amazing explanation, I found this part in Java super hard to understand, but your explanation is the easiest of the hardest I found on the web. Thanks!

IslamElshobokshy
Автор

Your's is one of the few videos i have liked, and trust me i have watched quite a few. Thanks a lot man awesome vids. Keep them coming

japhethjay
Автор

How incredebile you are! You should be teaching at Harvard. You are amazingly amazing. This is quite advanced and you make it so simple for us. Thank you soooo much. I appreciate it. I wish you could upload more videos and could update your channel.

thestarinthesky_
Автор

Edited*: lol a little all over the place with this one. You're still one of the best when it comes to full tutorials though : ) I'm learning a lot because of you. Thanks

avhd
Автор

One of the greatest videos in Java history. Thank you very much

jagermeister
Автор

Excellent videos.  It all makes sense.  The problem is knowing when to use these things in your own designs.  As with a lot of things in programming.

justintimesYT
Автор

Thanks a lot i was sturggling to do my uni project, you are life saver! ....excellent tutorial series

zmaktag
Автор

Thanks, everything starts to make sense!

andriusrimkus
Автор

all the topics are crispy and to the point ....wonderful effort ! thank you.

jagadeshg
Автор

Okay Finnaly, I believe I got it thanks to my "Re-watch the Video if you still dont get it" skill lol Thanks :D

heatlife
Автор

love the videos... I think i'm going to get the swing course on udemy!

fiercelizzard
Автор

Maybe ... you also need a very firm grasp of the contents of at least two of my previous videos, on upcasting/downcasting and on polymorphism. It won't make sense without this background knowledge. It's also possible that I may have jabbered like a lunatic throughout the video :)

caveofprogramming
Автор

Thank you so much! that was really helpful and clear... keep it up :)

majdrezik
Автор

This is a great video! Thank you so much for this! I'll probably get an A on my mid-term thanks to you :)

tjabercrombie