Generics in Java tutorial # 5 - Wildcards and subtyping in Generics | Java tutorials by Java9s

preview_player
Показать описание
Generics in Java Tutorial - Wildcards and Subtyping has been explained with good examples. I have given an example on why do we need Wildcards and then described about
Unbounded Wildcards, Upper Bounded Wildcards and Lower Bounded Wildcards. I have also explained how wildcards help in subtyping concept in Generics. The Examples used in the
Generics module is now available on Github from the links given below.

Generics Example on Github for download:

Complete Generics Tutorials playlist

Complete Java Beginners Tutorials:

Multithreading in Java tutorial:

Spring 3 MVC Framework tutorials:

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

Very very good man, I have been having trouble with generics for a while, and now I understand!

ArmasReverence
Автор

I went through full generic series and i am very thankful to you for getting the concept crisp and clear.

Bravo
Автор

This series is really helpful to understand how generics works and you will have a better understanding of the upper bound and lower bound of generic data type.
Recommended for anyone who wants to learn this concept clearly.

mingyan
Автор

Very Imformative video. Well done. One of my faviourite YouTubers for Tutorials is Dereak Banas and hes really good, but you are on his level of explanation, your very under rated.

chaosLord
Автор

very precisely explained and easy to grab generic wildcard concept

poojabhatt
Автор

Finally some great tutorial.
Thanks a lot

atiqurrahman
Автор

best video ever you tart me this in matter of min something our lecture could not do. they just ended up making thing complected then it needed to be. thank you very much!

mukeshpatel
Автор

Thank you Srinivas really I like it. I have been trying to understand generics, so searing on web finally found your videos on youtube helps me to understand clearly about generics

tiruc
Автор

clear and thorough explanations, many thanks.

l.o
Автор

Srinivas thanks a lot for your time ..Commendable effort ..Please add if anything left on this topic ..

anjim
Автор

Thank you very much, your turorial is helpful to me

darrenli
Автор

hi man ur video are understandable and well prepared

niyongaboeric
Автор

Great video Srinivas on the Generics & you have explained so nicely . However, the example used (introduction part) to explain "why we need wildcards?", somehow i was not convinced .

class Tray {

public void add(Glass<?> liquid) { .... }


}

can be achieved using Method type parameters like

public class Tray {

public <T> void add(Glass<T> liquid) {



}

}

It would be really great if you can please explain me with example, where exactly we would require wildcards ?

haiuday
Автор

Beautiful, Really Can't thank you enough!

danish
Автор

What a great video, however, I did notice an error in one of your slides sir. At 17:22, Juice is declared as a class, yet is implemented by the OrangeJuice class?

mcpaintcraft
Автор

what is the differenes of list< T > with list< ? > ?

ΑντρέαςΣωτηρίου-πγ
Автор

Nicely explained . Can you xplain Concurrency as well. Hope u ll do that also ina great fashion

pankajupreti
Автор

why can't you make type parameters in the method itself seemed to work fine for me it's just more annoying to call the method as you have to specify which class every time you call the method in order to use it properly.
public static <T extends Object> void mix(ArrayList<T> a)

but, that method is hard coded unless it's an object method then do
public void mix(ArrayList<T> a) and it grabs it from the class itself

Your Saying to do it like so which is better but still could be done either way
public static void mix(ArrayList<? extends Object> a)

jredfoxminecraft
Автор

At 17:22 you written class OrangeJuice implements Jiuce{} which is wrong. Juice is a class so you should have OrangeJuice extends Jiuce{}.

vchirilov
Автор

Why do you even need an unbounded wildcard? What is the difference between:
"Tray.add(Glass<?> glass){}" and
"Tray.add(Glass glass){}.

Mutex