Generics In Java - Full Simple Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 1.2K

  • @shivakumarn.r4931
    @shivakumarn.r4931 2 ปีที่แล้ว +65

    My attention span was 5 to 8 minutes before watching this video, now it's 17 minutes. Thanks Jhon!!

  • @thirajsenevirathne8259
    @thirajsenevirathne8259 2 ปีที่แล้ว +440

    This is the greatest Java tutorial I have ever found on TH-cam. Not too lengthy, covered huge concepts within a few minutes. As well as clear and understandable English.
    Thanks.

    • @YtubeUserr
      @YtubeUserr 11 หลายเดือนก่อน

      What are "huge concepts"?

    • @piotrek7633
      @piotrek7633 6 หลายเดือนก่อน

      ​@@YtubeUserrits a bot comment

    • @JamieCrew
      @JamieCrew 3 หลายเดือนก่อน

      @@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.

  • @Respect_Mah_Authoritah_
    @Respect_Mah_Authoritah_ 2 ปีที่แล้ว +1050

    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 2 ปีที่แล้ว +22

      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 2 ปีที่แล้ว +3

      yeah, I like to watch these videos, always has something we don`t know :p

    • @adipurnomo5683
      @adipurnomo5683 2 ปีที่แล้ว +1

      Same here

    • @sssxxxttt
      @sssxxxttt 2 ปีที่แล้ว +13

      Thanks, for this comment made me rewatch the end. Lost focus earlier :)

    • @jaimesastre6393
      @jaimesastre6393 2 ปีที่แล้ว +4

      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.

  • @lormalxd4055
    @lormalxd4055 2 ปีที่แล้ว +50

    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.

  • @clarkvaughan
    @clarkvaughan 2 ปีที่แล้ว +66

    Hands down, the best explanation I've ever seen. What a teacher.

  • @Free_time_Games
    @Free_time_Games 11 หลายเดือนก่อน +3

    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 2 ปีที่แล้ว +46

    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

  • @Jesus_Na_Causa
    @Jesus_Na_Causa 2 ปีที่แล้ว +11

    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!

  • @vazzdoin
    @vazzdoin 2 ปีที่แล้ว +81

    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.

  • @glenn8781
    @glenn8781 2 ปีที่แล้ว +11

    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 ปีที่แล้ว +1

      Can you send the link to that book or explain which scenario ... will only "?" work

    • @glenn8781
      @glenn8781 2 ปีที่แล้ว +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'

  • @licosan-z2v
    @licosan-z2v 2 ปีที่แล้ว +32

    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!

  • @arbazadam3407
    @arbazadam3407 ปีที่แล้ว +17

    This is by far the best video on generics in the entire universe. Mad respect for this dude 🙏🙏

  • @ruimenoita3996
    @ruimenoita3996 2 ปีที่แล้ว +62

    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 ปีที่แล้ว +1

      Yes pls explain wildcard with super keyboard

    • @TrisnoadiWikantoro
      @TrisnoadiWikantoro ปีที่แล้ว

      ​@@sameerkadgaye2048slammed my keyword

    • @thorim9885
      @thorim9885 6 หลายเดือนก่อน +1

      "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)

  • @Orctupus
    @Orctupus 5 หลายเดือนก่อน +1

    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.

  • @marcossantos-yr3ee
    @marcossantos-yr3ee 2 ปีที่แล้ว +9

    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!!! 👏🏼👏🏼👏🏼👏🏼👏🏼

  • @嘉然今天吃战斧牛-u1h
    @嘉然今天吃战斧牛-u1h 2 ปีที่แล้ว +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.

  • @Hughsie28
    @Hughsie28 2 ปีที่แล้ว +37

    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!

  • @biancaivanciuc8453
    @biancaivanciuc8453 8 หลายเดือนก่อน +1

    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!

  • @vuongang1308
    @vuongang1308 2 ปีที่แล้ว +5

    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!

  • @marta4933
    @marta4933 หลายเดือนก่อน

    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!

  • @ganapathi2531
    @ganapathi2531 2 ปีที่แล้ว +31

    This is my first comment in TH-cam 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 ❣️

  • @chiranjalitha5596
    @chiranjalitha5596 หลายเดือนก่อน

    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.

  • @moeal5110
    @moeal5110 2 ปีที่แล้ว +55

    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.

  • @albiole
    @albiole 3 หลายเดือนก่อน +1

    Best concise explanation of Generics ever filmed.

  • @Sachin-ev8mj
    @Sachin-ev8mj 2 ปีที่แล้ว +5

    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👍🏻

  • @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!

  • @MathematicalCowboy
    @MathematicalCowboy 2 ปีที่แล้ว +20

    Sensational lecture! Dude, please become a computer science professor! Your lectures are the best! Thank you so much.

  • @shareknowledge7766
    @shareknowledge7766 หลายเดือนก่อน

    This is the greatest Java tutorial I have ever found on TH-cam. Not too lengthy, covered huge concepts within a few minutes. As well as clear and understandable English.
    Thanks.😍

  • @THECOFFEEPOT
    @THECOFFEEPOT 2 ปีที่แล้ว +6

    I’ve never known anyone to explain things as easily as you do, fantastic video as always.

  • @nathanhalash3368
    @nathanhalash3368 2 ปีที่แล้ว +1

    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.

  • @andrewjaeger
    @andrewjaeger 2 ปีที่แล้ว +128

    *Hey John, can you please make a video on lambda expressions in Java? Would really appreciate!*

    • @akshaylonkar713
      @akshaylonkar713 2 ปีที่แล้ว +8

      Waiting for Lambda, Functional Interface, Streams

    • @richardday3136
      @richardday3136 2 ปีที่แล้ว +3

      @@akshaylonkar713
      l -> ( th-cam.com/video/d3_vmdKSE3c/w-d-xo.html )

    • @jaykay7932
      @jaykay7932 2 ปีที่แล้ว +1

      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 ปีที่แล้ว +25

      @@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());

  • @NickAndJulia
    @NickAndJulia 2 ปีที่แล้ว +2

    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

  • @victorezeganya7566
    @victorezeganya7566 2 ปีที่แล้ว +7

    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

  • @marwamohammed7002
    @marwamohammed7002 ปีที่แล้ว

    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

  • @wwefan9391
    @wwefan9391 2 ปีที่แล้ว +13

    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?

  • @Knowyourelectronix
    @Knowyourelectronix 2 ปีที่แล้ว +1

    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

  • @DigitalAstronautOG
    @DigitalAstronautOG 2 ปีที่แล้ว +6

    You have quickly become my favorite Java tutorial TH-camr! Thank you for demystifying confusing Java concepts! :)

  • @sunshine5106
    @sunshine5106 หลายเดือนก่อน

    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.

  • @bubut123
    @bubut123 2 ปีที่แล้ว +3

    This video reminds me the quote “If you can't explain it to a six year old, you don't understand it yourself”

  • @umangsharma7447
    @umangsharma7447 2 ปีที่แล้ว +1

    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 ปีที่แล้ว +4

    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!

  • @josephjackson7085
    @josephjackson7085 8 หลายเดือนก่อน +1

    I wish my intermediate Java programming class was just your videos imbedded with the labs and questions I would fly through it. Thank you

  • @manojr5257
    @manojr5257 2 ปีที่แล้ว +18

    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 ปีที่แล้ว +1

      That's the most simplest part of java 8 😃

  • @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.

  • @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..

  • @rickyav4534
    @rickyav4534 ปีที่แล้ว

    The way you explain with coding examples showing how they work.. that too in a simple way is amazing.

  • @jm56481
    @jm56481 ปีที่แล้ว +1

    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!!

  • @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!

  • @mohammadazizi3735
    @mohammadazizi3735 3 หลายเดือนก่อน

    I love how you ask yourself why we should use this and explaining very clear

  • @lenfy.
    @lenfy. 5 หลายเดือนก่อน +1

    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

  • @flexerfadrigalan
    @flexerfadrigalan 11 หลายเดือนก่อน

    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!

  • @04040953
    @04040953 2 ปีที่แล้ว +1

    This is the actually the best explanation o generic types ever, not only for Java but the concept as a whole!

  • @xeanluxcrille6847
    @xeanluxcrille6847 2 ปีที่แล้ว +1

    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.

  • @PaulOlsztyn-m2r
    @PaulOlsztyn-m2r 6 หลายเดือนก่อน

    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.

  • @exrocker47
    @exrocker47 ปีที่แล้ว +1

    Gosh I have been wasting my life trying to understand this concept on Kotlin. Now everything is crystal clear. Amazing video!

  • @craftyrouze
    @craftyrouze 2 ปีที่แล้ว +1

    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.

  • @theophilus494
    @theophilus494 2 ปีที่แล้ว

    i learnt everthing on generic in 17 minutes.... thank you John.. great video content..

  • @oswaldovirto5896
    @oswaldovirto5896 2 ปีที่แล้ว +1

    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!

  • @master4755
    @master4755 2 ปีที่แล้ว +1

    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) ?

  • @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.

  • @viorelbusuioc7624
    @viorelbusuioc7624 ปีที่แล้ว +2

    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!

  • @vikasreddy6970
    @vikasreddy6970 ปีที่แล้ว

    You Deserve Noble prize for crystal clear explanation which I don't understand over the years ......tq .

  • @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.

  • @dannggg
    @dannggg 2 ปีที่แล้ว

    This is the best video on generics. And I’ve seen nearly all videos on generics on TH-cam.

  • @umabharathyts1998
    @umabharathyts1998 5 หลายเดือนก่อน

    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 !!!!❤

  • @cheiguerabdelwehab6802
    @cheiguerabdelwehab6802 2 ปีที่แล้ว +2

    I used to hate java, till i discovered this chanel, thanks a lot

  • @blazekiller521
    @blazekiller521 2 ปีที่แล้ว

    Thank You So Much....
    Finally Even After 2 Years Of Professional Experience Got To Know Generics Clearly....
    Thanks A Lot....

  • @xinyiphang2860
    @xinyiphang2860 9 หลายเดือนก่อน

    This man taught me generics and wildcards better than my professors ever did. Thank you. You saved me :')

  • @jasonelish8935
    @jasonelish8935 10 หลายเดือนก่อน

    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.

  • @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...

  • @martinsanchez-hw4fi
    @martinsanchez-hw4fi 9 หลายเดือนก่อน

    This might be the best explanation ever. Every video I have watched of you is totally amazing. The flow you get from one idea to the next is next level. Thank you

  • @faraskhan3940
    @faraskhan3940 2 ปีที่แล้ว

    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

  • @deepanshupanwar501
    @deepanshupanwar501 ปีที่แล้ว

    I went through a 3 hour lecture on OOPs and after that went through a couple of TH-cam 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!

  • @tylerhinkle2873
    @tylerhinkle2873 2 ปีที่แล้ว +1

    I swear, without you and your videos I would not be passing my Advanced Java class this semester. Thank you so much!!!

  • @aja9388
    @aja9388 ปีที่แล้ว +1

    Thank you so much for making your videos. I have problems with concentration of attention and memory, and it is difficult for me to listen, watch and read something for more than an hour. I am now in my first year at university and your videos help me so much to understand the material better and remember it for a long time.

  • @hardxkor6561
    @hardxkor6561 7 หลายเดือนก่อน

    This is hands down one of the best Java channels and video tutorials I have seen available on TH-cam! Earned a sub!

  • @metaocloudstudio2221
    @metaocloudstudio2221 2 ปีที่แล้ว

    I've been working with Java for 16 years but I still watch your videos since they are satisfying

  • @VictorBombella
    @VictorBombella ปีที่แล้ว

    What'd be the difference between: "private static void printList(List myList)" and "private static void printList(List myList)"??

  • @sachinkadam5634
    @sachinkadam5634 2 ปีที่แล้ว +1

    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.

  • @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.

  • @ahmadrasheed2598
    @ahmadrasheed2598 ปีที่แล้ว +2

    Wow no words. Hands down the best Explanation of Generics🥰

  • @kfirlozer
    @kfirlozer 2 ปีที่แล้ว +1

    This is no longer super confusing, best tutorial I've seen on the subject, thank you John!

  • @NajamKEF
    @NajamKEF ปีที่แล้ว

    This was one concept in Java that I kind of knew but didn't fully understand until today. Thank you very much for this video!

  • @andyzhong1144
    @andyzhong1144 2 ปีที่แล้ว

    fantastic teaching on youtube for free for all! thank you, this is amazing! 17min solved my confusion i had for WEEKS!

  • @chinmayrath8494
    @chinmayrath8494 2 ปีที่แล้ว +1

    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 2 หลายเดือนก่อน

      I have the same doubt. anyone could explain, please?

  • @MicheleSantagiulianaMCP
    @MicheleSantagiulianaMCP หลายเดือนก่อน

    I finally understand Generics. Fourth time i go through this topic. THANKS!!!!!!

  • @christianogodinho9462
    @christianogodinho9462 11 หลายเดือนก่อน

    Your didatics, examples and video structure is fantastic. You managed to explain things in a very understandable way, while some professors take many classes to say it poorly. Keep it up because it surely is helping many students! Thanks a lot!

  • @samanthatkachyk4302
    @samanthatkachyk4302 2 ปีที่แล้ว +1

    I wish I could like this video a million times! I can't express how much your explaination helped me understand generics! Great video John. Thank you!

  • @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.

  • @otter502
    @otter502 2 ปีที่แล้ว

    This makes me cook so much more simpler and it also gives context to how arrays are initialized

  • @lx6381
    @lx6381 2 ปีที่แล้ว

    dude you are the best java teacher on youtube. thank you

  • @isaacweber7398
    @isaacweber7398 ปีที่แล้ว

    John. I really congrats you, brother. At this time I don't even finish that class but I'm really happy your way to teach, incredible. God bless you!

  • @Nallu_Swami
    @Nallu_Swami ปีที่แล้ว

    Thank you so much. Your Channel is the best Java programming channel that I have encountered while learning Java as a Freshmen in my College.

    • @Nallu_Swami
      @Nallu_Swami ปีที่แล้ว

      And not to mention the tutorial was so good i understood this in the first 5 minutes

  • @wlk7318
    @wlk7318 2 ปีที่แล้ว

    This could possibly be the best explanatory video I have ever seen. Thank you.

  • @BeyondNoise9
    @BeyondNoise9 2 ปีที่แล้ว

    What is the difference between List and List ?

  • @seatconnect224
    @seatconnect224 ปีที่แล้ว +1

    best java generic video I've eve seen

  • @MyThoughts19902X
    @MyThoughts19902X 2 ปีที่แล้ว +2

    Kudos for explaining a confusing topic in a very understandable manner.
    Just like to add we also have lower bounded wildcards

  • @RomanKnav
    @RomanKnav ปีที่แล้ว

    thanks, defining generics was on an exam, and you gave me the answer before the 5 minute mark!

  • @christiandopico8082
    @christiandopico8082 2 ปีที่แล้ว +2

    Love the explanations when you show the problem that this concept solves. It makes it more clear to understand !!

  • @imke6419
    @imke6419 2 ปีที่แล้ว +1

    Within only 17 minutes you helped me a lot for my upcoming exam! Thank you John! I will def check out your other Java Tutorials :)