Generics In Java - Full Simple Tutorial

  Рет қаралды 1,165,663

Coding with John

Coding with John

Күн бұрын

Пікірлер: 1 200
@Respect_Mah_Authoritah_
@Respect_Mah_Authoritah_ 3 жыл бұрын
I’ve “known” Generics for many years now but never really understood the difference between usage of wildcard vs a type parameter, even after having read the official docs a gazillion times. But your just one 15-min video has made everything crystal clear. Amazing! Thank You for making the video :)
@kakasy5335
@kakasy5335 3 жыл бұрын
as for me, the best explanation was in Bruce Eckel's book "Thinking in Java", everything fell into place after reading this monumental book
@caiocesarmelolopes2156
@caiocesarmelolopes2156 3 жыл бұрын
yeah, I like to watch these videos, always has something we don`t know :p
@adipurnomo5683
@adipurnomo5683 3 жыл бұрын
Same here
@sssxxxttt
@sssxxxttt 2 жыл бұрын
Thanks, for this comment made me rewatch the end. Lost focus earlier :)
@jaimesastre6393
@jaimesastre6393 2 жыл бұрын
Great explanation. I just have a stupid question for Cat. If you ask to shout(new Cat()) , a class, how is it that it prints 'meaw'? I didn't see clearly the class.
@thirajsenevirathne8259
@thirajsenevirathne8259 2 жыл бұрын
This is the greatest Java tutorial I have ever found on KZbin. Not too lengthy, covered huge concepts within a few minutes. As well as clear and understandable English. Thanks.
@YtubeUserr
@YtubeUserr Жыл бұрын
What are "huge concepts"?
@piotrek7633
@piotrek7633 7 ай бұрын
​@@YtubeUserrits a bot comment
@JamieCrew
@JamieCrew 5 ай бұрын
@@YtubeUserr Yes, it's illogical to assign magnitude to a non-physical construct such as a concept, but if your comment was not about that and rather why generics are not important then I disagree.
@shivakumarn.r4931
@shivakumarn.r4931 3 жыл бұрын
My attention span was 5 to 8 minutes before watching this video, now it's 17 minutes. Thanks Jhon!!
@vazzdoin
@vazzdoin 2 жыл бұрын
This tutorial was so simple that I immediately implemented the generics very easily to one of the projects that I'm working on whereas a day ago I was just refraining from doing it just because of not being very confident with the Generics concept. Great stuff John, this was a very informative yet very simple to understand tutorial. Keep up the excellent work.
@Jesus_Na_Causa
@Jesus_Na_Causa 2 жыл бұрын
I'm Brazilian, I learned more in your class with you speaking in English than I normally learn in the classes I attend in Portuguese. Very good teaching. Thank you so much!
@clarkvaughan
@clarkvaughan 2 жыл бұрын
Hands down, the best explanation I've ever seen. What a teacher.
@glenn8781
@glenn8781 2 жыл бұрын
At 16:00 I'm sure others might have had this question pop up in their minds as to why can't we just use private static void printList(List myList) instead of using the wildcard '?'. So although we could use the former format i.e. just with T in this case, but there's a difference between '?' and 'T'. 'T' means that your class or method will use classes of ONLY of type T, whatever T is defined to be, wherever a reference to T is made within the class or method, whereas '?' means that the class can be of ANY type. For deeper understanding of this difference, refer to the Generics chapter of the Java complete reference book wherein there's a specific use-case for when using won't work so one would have to use the wildcard '?'.
@rohitsai806
@rohitsai806 2 жыл бұрын
Can you send the link to that book or explain which scenario ... will only "?" work
@glenn8781
@glenn8781 2 жыл бұрын
@@rohitsai806 Yeah sure. So the book is Java The Complete Reference (9th edition) by Herbert Schildt. You can easily get its pdf online as it's one of the most recommended books for Java. The wildcard sub topic is under Generics, chapter 14 in the book. The scenario that I'm talking about is mentioned there more clearly wherein you can only use '? ' and not 'T'
@zupattipannoaraiwa8150
@zupattipannoaraiwa8150 7 ай бұрын
I had a Final exam on this topic and I can do it because of your clip! Thanks, John!!
@CodingWithJohn
@CodingWithJohn 7 ай бұрын
Thanks so much, and great work!
@嘉然今天吃战斧牛-u1h
@嘉然今天吃战斧牛-u1h 2 жыл бұрын
I am a junior Java back end developer, your tutorial is so efficient to explain everything clearly, thanks a lot . Recently, I review your video contents in spare time again and again.
@licosan-z2v
@licosan-z2v 3 жыл бұрын
Honestly, this video clearly explains what generics is all about. It took me awhile to understand it but right here, it just takes 17mins of your time. Thanks for putting out great and concise content on Java!
@lormalxd4055
@lormalxd4055 2 жыл бұрын
I just began my Education in Software Developing, one year passed and I've learned so much more from like 5 Videos from John than I've learned in the entire year, that's insane.
@Overlanding_America
@Overlanding_America 15 күн бұрын
have you been able to break into the tech industry? If so would you mind sharing how you did that?
@Orctupus
@Orctupus 6 ай бұрын
This deserves an award for being the first perfectly clear guide on generics. I've done many courses and many java certified developer courses that fail to explain exactly how they work. Well done.
@Free_time_Games
@Free_time_Games Жыл бұрын
I literally love tutors who not only explain the way to write a code but also follow the technique of clearifying why we use this instead of that which is incredibly useful . Thanks a lot ❤❤
@krishnachaitanya1265
@krishnachaitanya1265 3 жыл бұрын
OMG i never knew i can learn these many things in 17 mins. Man i would love to work under tech leads like you. People like these improve quality of life as well
@vuongang1308
@vuongang1308 2 жыл бұрын
Among tons of courses I have ever seen and learned, I found out that Coding with John is the best. He explains confusing things in such an easy way. Additionally, his voice is so clear and easy to understand, that I can focus only on the code running on the screen, whereas I need to pay attention to reading cc in other courses. You're amazing, John!
@arbazadam3407
@arbazadam3407 Жыл бұрын
This is by far the best video on generics in the entire universe. Mad respect for this dude 🙏🙏
@Hughsie28
@Hughsie28 2 жыл бұрын
There are just straight up some of the most perfect tutorials for someone like me, even 6 years in the Java industry and now upgrading to newer versions. Thanks John!
@JB-gv7pt
@JB-gv7pt Жыл бұрын
I'M SITTING HERE STRESSING TRYING TO UNDERSTAND WALLS OF TEXT FROM CANVAS AND YOU COME ALONG AND HAVE ME FEELING LIKE A PRO IN 17 MINUTES. I WANT YOU TO SIT HERE FOR A SECOND AND TRULY TAKE IN HOW MUCH TIME AND EFFORT YOU'VE SAVED ME AND THEN MULTIPLY IT TO THE HUNDREDS OF THOUSANDS OF PEOPLE THAT HAVE WATCHED THIS. SERIOUSLY TAKE IN THE IMPACT THAT YOU'VE HAD AND PAT YOURSELF ON THE BACK. YOU DESERVE IT. THANK YOU JOHN!
@ruimenoita3996
@ruimenoita3996 3 жыл бұрын
What I think it's missing is the generics that use the super word, like List, and explain the difference and the use cases of extends and super.
@sameerkadgaye2048
@sameerkadgaye2048 Жыл бұрын
Yes pls explain wildcard with super keyboard
@TrisnoadiWikantoro
@TrisnoadiWikantoro Жыл бұрын
​@@sameerkadgaye2048slammed my keyword
@thorim9885
@thorim9885 7 ай бұрын
"extends" is called "upper bound", because the given parameter has to extend the given classe. (e.g. T extends Number, if you want to add numbers) "super" is called "lower bound", because the given parameter has to be a "super-class" of the given class. (e.g. you only want bigger mammals like cats, dogs and horses - and not rodents)
@sajadhsingh226
@sajadhsingh226 13 күн бұрын
Ur a dump
@albiole
@albiole 4 ай бұрын
Best concise explanation of Generics ever filmed.
@ganapathi2531
@ganapathi2531 3 жыл бұрын
This is my first comment in KZbin after many years , video had so much good content and value, Please Post more videos on generics in real time application , as production ready code that we use for configuring external dependencies Congrats John , Keep up the Good work ❣️
@more_than_just_sentient
@more_than_just_sentient 18 күн бұрын
I know people tell this to you often, but let me remind you again John , you are THE BEST in java tutoring !
@moeal5110
@moeal5110 3 жыл бұрын
Another well-done tutorial here! Can't wait to see one on java 8 streams as I have not really found one that goes deep into these concepts.
@ayanSaha13291
@ayanSaha13291 Жыл бұрын
I have been using Java for more than 10 years now and have to admit that I hadn't understood generics so elegantly before. Thanks a lot for the video.
@wwefan9391
@wwefan9391 3 жыл бұрын
Great Video, but I'm confused on one thing, at 15:11 when you created the printList method , the Arguement was List myList and you said this is a list that will hold any type of object, but if you wanted the list to hold any type of object why didn't you just write List myList? Isn't that why one would use generics for like you explained in the video?
@seatconnect224
@seatconnect224 Жыл бұрын
best java generic video I've eve seen
@THECOFFEEPOT
@THECOFFEEPOT 2 жыл бұрын
I’ve never known anyone to explain things as easily as you do, fantastic video as always.
@biancaivanciuc8453
@biancaivanciuc8453 9 ай бұрын
Hi Jhon, I know this tutorial is from 2 years ago, I'm new in this IT field, and I just wanna tank you so much for all your tutoriales, you have no idea how much helped me! Please continue to do this! You are a GREATE techer! Stay safe!
@bubut123
@bubut123 2 жыл бұрын
This video reminds me the quote “If you can't explain it to a six year old, you don't understand it yourself”
@marta4933
@marta4933 3 ай бұрын
I didn't only understand generics with this tutorial, I also enjoyed watching it to the end! Video tutorials longer than 10 minutes often make me feel bored so can't follow them to the end without several pauses, but with John's video tutorials time just flies!
@marcossantos-yr3ee
@marcossantos-yr3ee 2 жыл бұрын
I know generics for a while. I remember my professor explaining about it and he spent kinda 9 hours, in 3 hours classes to explain what you have done in 15 minutes, unbelievable!!! Shout out to you!!! 👏🏼👏🏼👏🏼👏🏼👏🏼
@marwamohammed7002
@marwamohammed7002 2 жыл бұрын
I’m working with c# and no nothing about Java but now I think I’m going to learn from this channel about both Java and c# . Thank you so much
@DigitalAstronautOG
@DigitalAstronautOG 3 жыл бұрын
You have quickly become my favorite Java tutorial KZbinr! Thank you for demystifying confusing Java concepts! :)
@cheiguerabdelwehab6802
@cheiguerabdelwehab6802 2 жыл бұрын
I used to hate java, till i discovered this chanel, thanks a lot
@Sachin-ev8mj
@Sachin-ev8mj 2 жыл бұрын
I was looking for a short playlist/tutorial to understand the generics concept it was a bit confusing for me as you said. But this.. just one video cleared the concept. Thanks a lot! Keep making such videos👍🏻
@xeanluxcrille6847
@xeanluxcrille6847 2 жыл бұрын
I actually studied this extensively so many years ago and ended up implementing it for the DAOs used by the ORM in one of the projects I was assigned in in my previous company. To this day, I hear they are still using it as some sort of framework code for DAOs used by ORMs in that company even when I'm no longer around there. Watching this video reinforces the things I have learned and made me more confident that the things I learned when I studied it alone were correct. Kinda makes me feel that although it was an overextension of effort, it wasn't in vain.
@MathematicalCowboy
@MathematicalCowboy 2 жыл бұрын
Sensational lecture! Dude, please become a computer science professor! Your lectures are the best! Thank you so much.
@NickAndJulia
@NickAndJulia 3 жыл бұрын
Great video, thank you for the explanation! Tho I haven't noticed any info about why not to use generics everywhere. Googled a bit and found this: The only case when wildcards is the only option: Wildcards support both upper and lower bounds, type parameters just support upper bounds. So, if you want to define a method that takes a List of type Integer or it's super class, you can do: public void print(List
@andrewjaeger
@andrewjaeger 3 жыл бұрын
*Hey John, can you please make a video on lambda expressions in Java? Would really appreciate!*
@akshaylonkar713
@akshaylonkar713 2 жыл бұрын
Waiting for Lambda, Functional Interface, Streams
@richardday3136
@richardday3136 2 жыл бұрын
@@akshaylonkar713 l -> ( kzbin.info/www/bejne/mmTCp6CagLh4acU )
@jaykay7932
@jaykay7932 2 жыл бұрын
lambda is straight forward. the main function provides the data and you perform the operation within the parenthesis ie someMethod(x -> x.result ? 1 : 0)
@pinolskun8764
@pinolskun8764 2 жыл бұрын
@@jaykay7932 Your terrible attempt at an explanation gone wrong is precisely why these videos are instead highly appreciated. Leave the explaining tho who knows how to do it
@Hughsie28
@Hughsie28 2 жыл бұрын
I don't think I can keep up at Johns level as Pinols says, I'm also beginner/struggling with lambdas a bit, but from what I have learnt is anything after the "->" or in the "{ }" after the arrow is like the contents of a function method, any variable before the "->" is the current item you are iterating through. (It kind of reminds me of Java callbacks in a way) hope this example syntax below might be useful, I'll use streams as an example it seems a great way to use lambdas // Without curly braces (1 liners) List numbers = new ArrayList(1,2,3); numbers.stream().forEach(number -> System.out::println); // With curly braces (multi-liners) List names = new ArrayList("Dave", "John", "Andrew"); names.stream().map(name -> { if (name.equals("Andrew")) { return true; } return false; }).collect(Collectors.toList());
@umangsharma7447
@umangsharma7447 2 жыл бұрын
I am literally afraid of generics in java. Could never understand what are T, V & ? . But your video made me understand the basics so clear. Thank you so much !!
@juliopocielan7970
@juliopocielan7970 2 жыл бұрын
I never understand the right way of generics, I always have a kind of confusion about that, so here comes a 15-min video that clear everything. Just an amazing work! Thank you for make this video!
@jm56481
@jm56481 Жыл бұрын
I've been a SDE for a couple years and found myself using generics forever without actually knowing what was going on. Thanks for the background and clear explanation!!
@victorezeganya7566
@victorezeganya7566 2 жыл бұрын
Beautiful Tutorial. It’s just amazing how you were able to explain this complex topic very easily. Keep it up John you are adding value to lives. God bless you for the good work you are doing sharing knowledge
@Knowyourelectronix
@Knowyourelectronix 3 жыл бұрын
This man is just awesome.....I wish I have a teacher like this person in my previous semester ... And I got to know him now finally god hears my prayers... don't stop these tutorials man.....these are life for people like us
@manojr5257
@manojr5257 3 жыл бұрын
Hey John, thank for the tut! You made generics so simple to understand. Would love to see tuts on followings; Method referencing, Lambda Functions Optionals Stream API Thanks again.
@flex_prods
@flex_prods 2 жыл бұрын
Totally, Lambda is really confusing
@TheShlips
@TheShlips 2 жыл бұрын
@@flex_prods no it isnt
@Shivam8Pandey
@Shivam8Pandey 2 жыл бұрын
That's the most simplest part of java 8 😃
@chiranjalitha
@chiranjalitha 2 ай бұрын
Only if our university was this chill to teach something simply like you do. They start with complicated stuff and it gets nowhere in our heads. Thanks for the Tutorials.
@josephjackson7085
@josephjackson7085 9 ай бұрын
I wish my intermediate Java programming class was just your videos imbedded with the labs and questions I would fly through it. Thank you
@viorelbusuioc7624
@viorelbusuioc7624 Жыл бұрын
I'm here because a paid trainer didn't managed to make me understand the Generics. Now it's more clear to me. Thank you, kind sir!
@lenfy.
@lenfy. 6 ай бұрын
I am a beginner in Java and even though I don't know that much about Java I could easily understand most of the things in the video. I'm so happy that I came across your channel. Looks like this channel will help me a lot :D
@theophilus494
@theophilus494 2 жыл бұрын
i learnt everthing on generic in 17 minutes.... thank you John.. great video content..
@dannggg
@dannggg 2 жыл бұрын
This is the best video on generics. And I’ve seen nearly all videos on generics on KZbin.
@isurugayashan4573
@isurugayashan4573 Жыл бұрын
The explanation was quite exceptional. i am a java engineer for 5 years and now only i got to know the full context of the generics.. thanks and keep feeding..
@maxfan6035
@maxfan6035 2 жыл бұрын
I failed an interview. One question is about Java generic which was introduced in 1.5. I never wanted to review it with details since I thought I knew it when I used the similar feature in C++ years back. It turns out I needed to. This video really helps in a sense covering pretty much every corner of this feature in an easy to understand way.
@Duedme
@Duedme 2 жыл бұрын
Now I finally understood, thank you Dean Pelton
@mohammadazizi3735
@mohammadazizi3735 4 ай бұрын
I love how you ask yourself why we should use this and explaining very clear
@AlkonBG
@AlkonBG 4 ай бұрын
I have the same positive opinion as everyone else in the comments. Any time I have to waste 3 hours searching for the right information over the web or on a lecture that only 10 minutes out of the total duration address my concerns and at the same time those 10 minutes have to be collected in portions during different parts of the video - one minute from here, 2 minutes from there and the rest 7 minutes slightly before the middle at approximately 17.38 minutes after the start but without counting the first minute, I end up deleting system 32 and watching John afterward!
@exrocker47
@exrocker47 Жыл бұрын
Gosh I have been wasting my life trying to understand this concept on Kotlin. Now everything is crystal clear. Amazing video!
@metaocloudstudio2221
@metaocloudstudio2221 2 жыл бұрын
I've been working with Java for 16 years but I still watch your videos since they are satisfying
@xinyiphang2860
@xinyiphang2860 10 ай бұрын
This man taught me generics and wildcards better than my professors ever did. Thank you. You saved me :')
@sunshine5106
@sunshine5106 2 ай бұрын
Very Helpful! Clear concise and complete explanation. If someone is finding it a little fast please slowdown the playback speed and watch the video, it's really good.
@ruhandanielkremes3898
@ruhandanielkremes3898 Жыл бұрын
Man, you changed my life with this video, i was having a lot of problems trying to unsdertand how(the first thing of my subject works) generics works and I hasn't found anywhere in my mother tongue, i was thinking that i wouldn't be able to understand how does that work until I found you! The explanation made me think by other perspective and made me confourtable to understand how does all of this works( even missing somethings like what does have on animal or how does exactly the try catch trow and trhows works) and now i'm ready to understand a lot more thigs of my classes. THANK YOU!!!!! SO MUCH!!!!!!!!! You are crazy man!
@kingstonejob7840
@kingstonejob7840 2 жыл бұрын
Wow! fast but best explanation ever, good job.
@faraskhan3940
@faraskhan3940 3 жыл бұрын
I have learned two thins today that had plagued me for years ! 1. The and 2 the reason that the list is not subclass of list
@master4755
@master4755 2 жыл бұрын
So in your code you have : private static void PrintList (List myList) {} Couldn't you also do ??: private static void PrintList (List myList) {} They appear as though they work the same, so what's the difference, surely one is better than the other (or more dangerous to use if the compiler doesn't treat it the way we want) ?
@nathanhalash3368
@nathanhalash3368 2 жыл бұрын
Your videos are clutch. Your a life saver. My professor makes up a whole bunch of super complex examples when attempting to explain these topics to the class but just ends up confusing us due to the complexity of what his code is trying to do.
@lx6381
@lx6381 2 жыл бұрын
dude you are the best java teacher on youtube. thank you
@04040953
@04040953 2 жыл бұрын
This is the actually the best explanation o generic types ever, not only for Java but the concept as a whole!
@chinmayrath8494
@chinmayrath8494 2 жыл бұрын
One doubt: when you spoke about wildcards, you gave the example of passing a List of any class to a method. Instead of using wild card, we could've used this way right?: private static void printList(List myList) This works perfectly fine as well, then why do we need wildcards ?? 🤔
@kajalkoravi7960
@kajalkoravi7960 3 ай бұрын
I have the same doubt. anyone could explain, please?
@shareknowledge7766
@shareknowledge7766 2 ай бұрын
This is the greatest Java tutorial I have ever found on KZbin. Not too lengthy, covered huge concepts within a few minutes. As well as clear and understandable English. Thanks.😍
@petebrown6356
@petebrown6356 Жыл бұрын
I did mountains of Java from mid-90's to 2010-ish, then focused on an architect role. I recently had to understand a new Java framework and it uses all these new Java features - I was having a hard time scanning through the code. THANK YOU for the clear and concise explanation.
@ahmedbishree9429
@ahmedbishree9429 2 жыл бұрын
I'm watching this video every time that I come across generic types in my work, Man, you are a great toter thanks a lot...
@rickyav4534
@rickyav4534 Жыл бұрын
The way you explain with coding examples showing how they work.. that too in a simple way is amazing.
@flexerfadrigalan
@flexerfadrigalan Жыл бұрын
Fantastic video. The "why" in the beginning is what really solidified my understanding as to why we need generics. I know how to use generics, but now I understand why we really need them! Thank you!
@jasonelish8935
@jasonelish8935 11 ай бұрын
Great crash course on Java generics. Each time during the video I was like "What about this situation", you covered it shortly after, which was great. Thanks.
@VictorBombella
@VictorBombella Жыл бұрын
What'd be the difference between: "private static void printList(List myList)" and "private static void printList(List myList)"??
@royassis2185
@royassis2185 2 жыл бұрын
Hey John, thanks for the video, it's very informative. I got a question about the code in the video at 16:05. Why should I use and not in the example ?
@sssxxxttt
@sssxxxttt 2 жыл бұрын
I'm just quoting the video, from memory "...although Integer is a subclass of Object, List isn't a subclass of List..." Better watch it again. I had to :)
@hardxkor6561
@hardxkor6561 8 ай бұрын
This is hands down one of the best Java channels and video tutorials I have seen available on KZbin! Earned a sub!
@PaulOlsztyn-m2r
@PaulOlsztyn-m2r 7 ай бұрын
John, you are just a gifted teacher. Thank you so much for these videos. I've reached the age that I can never remember all the Java stuff I've learned, and I know I can get a quick refresher that will have me back up to speed by watching one of your videos. Or if I need to learn a new topic, I can just watch one of your videos and in a short time I'll be up to speed. Thank you so much.
@dhaw
@dhaw 2 жыл бұрын
Hands down the best explanation of java generics .
@vikasreddy6970
@vikasreddy6970 Жыл бұрын
You Deserve Noble prize for crystal clear explanation which I don't understand over the years ......tq .
@blazekiller521
@blazekiller521 2 жыл бұрын
Thank You So Much.... Finally Even After 2 Years Of Professional Experience Got To Know Generics Clearly.... Thanks A Lot....
@oswaldovirto5896
@oswaldovirto5896 2 жыл бұрын
Hey man, I just want to say thank you. I've been struggling with this topic for a while now and now I feel a lot more comfortable working with generics after watching this video. You're the best!
@jaggadaku3565
@jaggadaku3565 Ай бұрын
you literally made Java so much easier for us......super job
@alexaanderpm
@alexaanderpm Жыл бұрын
I have seen many of your videos. You are by far, the best Java content creator.
@RomanKnav
@RomanKnav Жыл бұрын
thanks, defining generics was on an exam, and you gave me the answer before the 5 minute mark!
@imanihalley98
@imanihalley98 2 жыл бұрын
by far the best explanation of generics on KZbin !
@maziarchoubineh7787
@maziarchoubineh7787 Жыл бұрын
First and foremost, I would like to thank you for your excellent teaching. I have been learning this topic for months, and now I have fully understood it. I would recommend providing the code used in the lessons as a zip file.
@wizardsofscript
@wizardsofscript 2 жыл бұрын
I like how you explain, although I'm applying it C# and not java.
@craftyrouze
@craftyrouze 2 жыл бұрын
Thanks for clarifying the usage of each. I was mostly confused about ?, but it now makes sense that its used with collections rather than individual objects.
@deepanshupanwar501
@deepanshupanwar501 Жыл бұрын
I went through a 3 hour lecture on OOPs and after that went through a couple of KZbin videos but I was not able to fully understand what exactly generics were and why are they used. Then I came across this 17 minute video which cleared all my doubts and made everything super super simple. The difference a teacher makes is unbelievable. Subscribing and watching other videos too. Thank you so much!
@ahmadrasheed2598
@ahmadrasheed2598 Жыл бұрын
Wow no words. Hands down the best Explanation of Generics🥰
@karla284
@karla284 Жыл бұрын
This man saved me so many times
@favour405
@favour405 Жыл бұрын
You really know how to teach and get knowledge across. Some people are knowledgeable but don't know how to teach. I learn a lot from your videos. Thanks a lot.
@AlexandreGTavares
@AlexandreGTavares Жыл бұрын
What's the difference between: private static void printList(List myList) and private static void printList(List myList)
@otter502
@otter502 2 жыл бұрын
This makes me cook so much more simpler and it also gives context to how arrays are initialized
@BeyondNoise9
@BeyondNoise9 2 жыл бұрын
What is the difference between List and List ?
@andromilk2634
@andromilk2634 Жыл бұрын
I came to this video because I was wondering how come with generics we are able to "extend" interfaces, since usually with interfaces, we use "Implement" them, and you touched on this exact point for which I came for. What a funny coincidence, you have the right word for everything each time, I really appreciate it. So, by the looks of it, there's no particular reason for this behaviour/it's an obscure thing which we just have to accept, an exception to the usual rule which we know? Thanks again!
@sachinkadam5634
@sachinkadam5634 2 жыл бұрын
Honestly I have learn many things about generics in this small video. Thank you John for such a nice explanation and hands on demo on generics.
@MicheleSantagiulianaMCP
@MicheleSantagiulianaMCP 2 ай бұрын
I finally understand Generics. Fourth time i go through this topic. THANKS!!!!!!
@umabharathyts1998
@umabharathyts1998 6 ай бұрын
I never understood this topic for years , I am having my interview tmrw this helped me a lot to understand it quickly.KEEP DOING THE GOOD WORK MAN !!!!❤
Array vs. ArrayList in Java Tutorial - What's The Difference?
17:36
Coding with John
Рет қаралды 567 М.
Static vs Non-Static Variables and Methods In Java - Full Simple Tutorial
11:29
5 Signs of an Inexperienced Self-Taught Developer (and how to fix)
8:40
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 783 М.
Java generics ❓
22:04
Bro Code
Рет қаралды 119 М.
Set and HashSet in Java - Full Tutorial
20:43
Coding with John
Рет қаралды 238 М.
When to use Traits, Interfaces, and Abstract Classes in PHP
15:08
Andrew Schmelyun
Рет қаралды 24 М.
Harsh Truth of Java in 2024! Ft. Ultimate Java Developer @Telusko
28:46
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 901 М.
Vectors in Java: The 1 Situation You Might Want To Use Them
16:13
Coding with John
Рет қаралды 86 М.