Thank you so much for this. The first good explanation of wildcards I have seen so far!
@kalebnegussie81402 жыл бұрын
Well done. I had a question and you answered it 100%. Awesome video. Thanks.
@geekific2 жыл бұрын
Glad I did! Happy to help :)
@DivinityAgarioMore3 жыл бұрын
You are very good at explaining. For the future, maybe you can look at providing realtime problems and solutions to deepen our understanding further. Other than that, excellent video!
@geekific3 жыл бұрын
Thanks a lot, happy you liked it! And great suggestion will keep it in mind for the future :)
@pavolalmasi37602 жыл бұрын
I am so happy that I've found your channel, your videos are super informative and everything is very well explained, keep it up
@geekific2 жыл бұрын
Thank you! Glad I could help :)
@ucanhtran4372 Жыл бұрын
GREAT EXPLANATION !!!!
@notsoholyspirit93122 жыл бұрын
Extremely helpful video !!
@geekific2 жыл бұрын
Glad you think so!
@manux773910 ай бұрын
thanks for the explanation!
@innerpeace5877 Жыл бұрын
you are the best your video saved me ily
@alvaro1379 Жыл бұрын
wow this was so well explained thanks for the video!!
@pedromedeiros80253 жыл бұрын
It was very helpful. Great job!
@geekific3 жыл бұрын
Glad! Thank you!
@markconnolly5260 Жыл бұрын
Great videos. Live them ❤
@louzexuzhou3 жыл бұрын
This is gold.
@geekific3 жыл бұрын
Thanks a lot! Your words are gold to me :)
@bluem03 Жыл бұрын
Why shouldnt i always use Wilcards? and just bound to a specific Type
@bjugdbjk3 жыл бұрын
Great and Simple to the point !! One question though, u mean Generics are class wise and wildcards are for Method wise boundaries ? is there any other difference further ..
@geekific3 жыл бұрын
Generics can actually be used for methods as well as for classes, when we do so the method is called a generic method, so the type parameter will be tied to the method alone and not the class. However, making use of the wildcard at class level won't really make sense, your code won't compile. Wildcards are used in Java to handle variance, and you can't create a class if you don't know what attributes it defines! We will be covering all these in a part 2 Generics video, stay tuned! Hope this answers your question :) Cheers!
@coop67342 жыл бұрын
Thank you!
@esoterikouno2 жыл бұрын
thx, now I understand.
@geekific2 жыл бұрын
Glad I could help! :)
@kakashi999082 жыл бұрын
Hello I am remaking data structures to better understand how to use them. Can you explain wild cards used in the class level like this: public class MaxPriorityQueue
@geekific2 жыл бұрын
Hello, we will be uploading a video Part 2 that dives in the details of generics and should answer all of your questions regarding this topic! Stay Tuned!
@ionguzun3952 Жыл бұрын
nice video
@lucasf.v.n.41973 жыл бұрын
No ? super T explanation thumbs down
@geekific3 жыл бұрын
Thanks for the review! However, am not sure what seems to be the problem or which parts of the video weren't clear, can you elaborate so we can fix it?
@lucasf.v.n.41973 жыл бұрын
@@geekific u only explained
@geekific3 жыл бұрын
You are right :) We'll be working on a part 2 generics video to expand further on the subject! Stay Tuned! And meanwhile, as a quick answer to your question: 'extends' means that the generic type (?) has to be a subclass of T, however, 'super' means that the generics type has to be a super class of T, in other terms it is T that extends the generic type (T represents the lower bound here). Hope this helps. Cheers!
@lucasf.v.n.41973 жыл бұрын
@@geekific Got it; but when should I be using which? And why in the documentation there are methods that use super? For example, the Stream interface has the method forEach, that takes a "Consumer
@geekific3 жыл бұрын
Okay, the fully detailed answer will have to wait for the video, but in short remember PECS (Producer extends, Consumer super). When you are producing or "reading" use extends, when you are consuming or "writing" go for super and if you need both do not use a wildcard just T. They make your code more flexible by allowing the use of subtypes and supertypes when needed. Stay tunned for more details in an upcoming video!