Generics in Java

Поділитися
Вставка
  • Опубліковано 3 гру 2024

КОМЕНТАРІ • 164

  • @arkojyotisen1929
    @arkojyotisen1929 4 роки тому +41

    Sir in this lockdown I have learned a lot in programming just because of you. Thank you so much

  • @nasreenmohsin
    @nasreenmohsin 7 років тому +40

    he explained it in very simple manner now i understand this concept hope he will upload more complex way to define generic

  • @queenskeleton4937
    @queenskeleton4937 5 років тому +23

    Best Java channel. Straightforward explanation, with code live demonstrated. You are sure to learn just by watching this. I learned from you in Spring Boot, REST services, and Java core APIs. Thank you so much!

    • @vikashemnani2371
      @vikashemnani2371 3 роки тому

      Telesko is good but I would like you to check Java Brains channel of Kaushik, your view might change

  • @MsElsospechoso28
    @MsElsospechoso28 4 роки тому +7

    This guy is awesome, he really likes teaching which is highly appreciate it.

  • @aishwaryadash4166
    @aishwaryadash4166 4 роки тому +1

    This is the single most important video if you want to be clear about Generics...Thank you!!

  • @crankMiHoffer
    @crankMiHoffer 6 років тому +14

    7:35 mind blown; thank you for this video

  • @abhishekedu
    @abhishekedu 5 років тому +1

    The beauty of java is that before solving clients problem you have to solve java problems.

  • @willyang1770
    @willyang1770 2 роки тому +1

    Thank you so much! I've been looking all over the internet for this and none of them were as good and straightforward as this! Thank You SO MUCH!

  • @kiranvysya
    @kiranvysya 3 роки тому +8

    I knew about Telusko from its inception but never liked or followed. But after seeing this one single lecture. Hands down never judge a book by its cover

  • @gajeshtripathi5721
    @gajeshtripathi5721 3 роки тому +2

    I was always confused with "? extends ..." & "? super ...." but now it is clear to me. Thanks Navin Sir.

  • @anthonycarella1779
    @anthonycarella1779 5 років тому +13

    Very straight-forward and easy to understand. Thanks for the content!

  • @farhaankazi7134
    @farhaankazi7134 Рік тому

    in method definition of public void demo(ArrayList

  • @divyeshkumarbalar7732
    @divyeshkumarbalar7732 6 років тому +70

    your title music is damn scary if you have seen haunted on discovery channel

    • @wisniewz
      @wisniewz 4 роки тому

      Read this as I was thinking the same thing. I'm dying over hear with that into music. LOL

    • @corianderIsBussin
      @corianderIsBussin 4 роки тому +6

      as scary as generics in java

    • @mainakray6452
      @mainakray6452 4 роки тому

      ​@@corianderIsBussin :))))))

  • @aminesfahani3563
    @aminesfahani3563 3 роки тому

    The best explanation for Generics and Collection interface and Collections classes

  • @nicksonmakama
    @nicksonmakama 6 років тому +12

    This really is the best video on Generics, I love it!

  • @Fnaf-vh9cs
    @Fnaf-vh9cs 3 роки тому

    This man is great I wish you a healthy and happy life and thanks for sharing.

  • @vineethnair4137
    @vineethnair4137 4 роки тому

    Naveen sir your presentation is simple and understandable

  • @karanhaldar3401
    @karanhaldar3401 Рік тому

    I can't understand this in my class but here I've cleared all of my confusions in one shot ❤❤❤❤
    Thank u sir ❤❤

  • @mr.RAND5584
    @mr.RAND5584 4 роки тому

    Entities have different type of class. Student class, employee class. Thanks i need to populate data from database as List

  • @govindrudrawar2540
    @govindrudrawar2540 4 роки тому

    lucid explanation. I have been watching ur videos for quite a while now. Thanks Navin Reddy. ur amazing.

  • @manikandand2541
    @manikandand2541 5 років тому +1

    u have some enormous talent sir...plz continue this job..all the best

  • @Layarion
    @Layarion 2 роки тому

    Now this was a good video. You didn't cut it too short and leave out some of the nuances like others do. Now i'ma go lookup that ? thing and Super.

  • @sourabhbagade6932
    @sourabhbagade6932 4 роки тому

    Even I m non it student, I m getting this concept clearly
    Thanks to telusko🙏👍

  • @zhongweimao5548
    @zhongweimao5548 5 років тому

    Thank you so much Bro for your explanation. Your video resolved many of my confusion that even my lecturer was not able to solve coz she did not understand my confusion. Generics is much more clear now for me.

  • @dipagove8963
    @dipagove8963 5 років тому

    Thanks lot... for exact concept of java & all telusko videos to teach all technologies

  • @ashuzguitar
    @ashuzguitar 3 роки тому

    Thanks a ton Navin. You are the best!

  • @shwetarautr01
    @shwetarautr01 4 роки тому

    Hello sir! I need to know which subclass is sorted hashMap Or hashTable... ???
    In case of....
    Map m= new HashMap(); or HashTable() ;

  • @nasreenmohsin
    @nasreenmohsin 7 років тому

    need help confusion on following declaration why ..
    1) class CalendarDate implements Comparable (when we implement Comparable we write in the end )
    2) class OrderPair implements Pair .... (in user define interface we write after Class can somebody explain it)

  • @studyonline3236
    @studyonline3236 4 роки тому

    what's T extends Comparable ?

  • @mrrobot1289
    @mrrobot1289 3 роки тому

    Very detailed explanation. THANK YOU!!!!

  • @tmzpanda
    @tmzpanda 4 роки тому

    @ Generics
    @ List implementation
    @ Implement manually
    @ example
    @ "extends"
    @ example
    @ "super"

  • @fanwu281
    @fanwu281 5 років тому +6

    Thank you so much, it's very easy to understand!

  • @mohitsinghrawat503
    @mohitsinghrawat503 7 років тому +3

    Awesome bro... Best Video I ever saw for Generics... Thanx man.

  • @aaratprasadchopra3255
    @aaratprasadchopra3255 4 роки тому

    Thank You Navin, BIG Help!

  • @Ankit5311
    @Ankit5311 5 років тому +2

    Its similar to temlate in C++. They changed template to generics

  • @fluffy24
    @fluffy24 3 роки тому

    You are really great my friend, tank you for your videos

  • @i.d.1988
    @i.d.1988 7 років тому

    Another great video that helped me with understanding my school homework. Thank you sir.

  • @alexandernaywin8250
    @alexandernaywin8250 3 роки тому

    Thank you so much, your generics explanation is awesome.

  • @chakibbensari1850
    @chakibbensari1850 3 роки тому

    The error at 3:37 is about Integer.parse() and not the List.add

  • @TsukiCTF
    @TsukiCTF 7 років тому

    Just asking, but what is the point of adding getters and setters in the class Container? From what I have tested so far, everything worked fine without those..

    • @djus5
      @djus5 6 років тому

      Everything worked fine without those because getter and setter for value were not used/called anywhere in the code.
      Point for adding those was just to show how generics works.
      For example, if you made object obj, like in the video:
      Container obj = new Container();
      and you want to set value for it:
      obj.setValue("Java");
      then compiler will know that T is String,
      public void setValue(T value); ----> public void setValue(String value);

  • @akchatsrivastava4209
    @akchatsrivastava4209 6 років тому

    Great method of teaching.

  • @thehiddenbalkans
    @thehiddenbalkans 4 роки тому +2

    Love the way you say "Dabl" & "GettaSetta" :D

  • @SanjayKmsd
    @SanjayKmsd 6 років тому

    You are simply awesome Navin

  • @vladanulardzic5859
    @vladanulardzic5859 4 роки тому

    100% explained ! Knowledge necessary for heavy solutions. Thank you. Keep on.

  • @milad_mo
    @milad_mo 4 роки тому

    It was good but please discuss about generic method and uses of generics in combination with reflection

  • @RohitKumar-wq9lk
    @RohitKumar-wq9lk Рік тому

    Bhai Mere mazza aa gya yaar

  • @tuweiIsaac
    @tuweiIsaac 5 років тому

    its good that such people do exist.#ilovetelusko

  • @alisu111
    @alisu111 5 років тому +1

    Great video, now I understand the concept. Thanks a lot!

  • @2wardruid2
    @2wardruid2 4 роки тому +1

    Thank You, your lesson helped me a lot!

  • @PatteeGreen
    @PatteeGreen 3 роки тому

    Thank you!! Excellent explanation :)

  • @abhinavgupta3387
    @abhinavgupta3387 4 роки тому

    Good leason.
    I was easily able to understand the generics.
    Thanks.

  • @intsoumen
    @intsoumen 7 років тому

    Awesome Video I have ever seen ,
    in short
    in 5 min
    Complete
    Compaq

  • @romeoacevedo1040
    @romeoacevedo1040 5 років тому

    Really nice explaination. Thanks for all the details!

  • @shrutikanachankar4932
    @shrutikanachankar4932 Рік тому

    Thank You Sir🙏🏻. You taught it very well .

  • @sarikagarg8185
    @sarikagarg8185 4 роки тому

    class container{
    T value;
    public void set(T value)
    {
    this.value=value;
    }
    public T get(){
    return this.value;
    }

    }
    public class Read {

    public static void main(String[] args) {

    container a = new container();
    a.set(1);
    System.out.println(a.get());


    }

    }
    Sir in above code if i choose containera=new Container(), then it works but the time I choose it don't. It is understood that container means object could be of T Type or of type to which it extend.

    • @teluskosupport1
      @teluskosupport1 2 роки тому

      means either T is Parents type or its child class

  • @Aryan46KingOfHearts
    @Aryan46KingOfHearts 5 років тому +1

    sir how to do that you have done at 10:49 to see which class/interface extends which class
    when i do that in eclipse by holding control something different shows up "source not found
    "

  • @contactamartya
    @contactamartya 6 років тому +1

    many many thanks ... superb video

  • @nagendrasai3946
    @nagendrasai3946 6 років тому

    Well explained. Thank you very much

  • @harshitahuja5043
    @harshitahuja5043 2 роки тому

    Excellent Video

  • @ahsanali5527
    @ahsanali5527 3 роки тому

    great explanation

  • @admannas123
    @admannas123 3 роки тому

    Nice explanation

  • @madanmohanpachouly6135
    @madanmohanpachouly6135 3 роки тому

    Well Explained

  • @yonis963
    @yonis963 5 років тому

    clear explanation , thanks mate.

  • @pranaytanniru7764
    @pranaytanniru7764 4 роки тому

    It's clear, thank you.

  • @studyonline3236
    @studyonline3236 4 роки тому +1

    Hello anna! just want to know about something which I encountered while I was coding my own Collections(say linkedList). So, I used and everything was working fine, however, when I tried to write a method for finding minimum in Linkedlist, compiler keeps throwing errors(as finding minimum wouldn't be possible if the type were (T=)String. So, I want just this method to accept Integer or any Number values and whenever the type doesn't fit it should neglect it. How can I do so?

  • @muhammadmoersalin6846
    @muhammadmoersalin6846 5 років тому

    great explanation, thanks.

  • @mehrshadtavana1429
    @mehrshadtavana1429 3 роки тому

    very helpful tnx a lot

  • @thomasflood8507
    @thomasflood8507 7 років тому

    Excellent!! Thank you very much indeed. .

  • @ashokchilakala2879
    @ashokchilakala2879 3 роки тому

    sir will u please provide the practical session videos

  • @guambomber448
    @guambomber448 4 роки тому

    WOW that was a great video!

  • @kylemanley915
    @kylemanley915 4 роки тому

    Really good tutorial

  • @thatsenam9183
    @thatsenam9183 6 років тому

    such a awesome video. I loved it.

  • @ayushchhanganni2357
    @ayushchhanganni2357 3 роки тому

    Amazing content!!

  • @TheCodeHunter
    @TheCodeHunter 3 роки тому

    thank you so much for this!

  • @Isha_Sethi
    @Isha_Sethi 3 роки тому

    4:12 I didn't understand line 18...what is it doing?
    13:05 didn't understand

  • @A09550
    @A09550 7 років тому

    concise and clear, thanks

  • @nethrajoshi1593
    @nethrajoshi1593 3 роки тому

    CAN WE USE ? WHILE CREATING GENERIC CLASSES

  • @djus5
    @djus5 6 років тому +1

    at 8:27 it should be T value = null;

  • @upengan78
    @upengan78 4 роки тому

    Thank you sir 🤠

  • @lemaaaron9009
    @lemaaaron9009 2 роки тому

    Thanks I love it 🤝

  • @am-oo5uu
    @am-oo5uu 6 років тому

    Great video. Thank you so much.
    Could you tell me how to access the java proviced classes like List.class and Float.class. I use Eclipse as well but haven't figured it out yet.

    • @JimmyBFMV
      @JimmyBFMV 6 років тому

      Do you mean: How do you go to the implementation of List? Just right click --> Go To --> Implementation (or [Ctrl]+[Alt]+[B]).

  • @foton8998
    @foton8998 4 роки тому

    thank you. It was effective

  • @sergdv3863
    @sergdv3863 7 років тому

    Can you show a real example of using super keyword? I understood that it is used as constraint for concrete type, but when and where I should use it?

    • @djus5
      @djus5 6 років тому

      Use '? super T‘ whenever you want to indicate a type which is a super-type of 'T'.

  • @shivaniverma7789
    @shivaniverma7789 5 років тому +1

    U r awsm sir😍😍

  • @Ren-nf4pz
    @Ren-nf4pz 3 роки тому

    very good thanks

  • @govardhangova5411
    @govardhangova5411 3 роки тому

    sir in Hash map can we enter only key and values or we can enter one key no of values (like = sid,sname,address and phone )

  • @prisinha
    @prisinha 2 роки тому

    5:45 Can T be replaced by integer or float ? 😃🤣😂

  • @ΑντρέαςΣωτηρίου-π8γ
    @ΑντρέαςΣωτηρίου-π8γ 7 років тому +1

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

    • @divyeshkumarbalar7732
      @divyeshkumarbalar7732 6 років тому

      list -> where T can be any fixed type and which is entered by you as a programmer and than it can not be changes in the middle
      list -> this is wild card, which can be anything. usually used when you dont know whats going to come up

  •  5 років тому

    Nice vid man!

  • @ShujathHussain0
    @ShujathHussain0 6 років тому

    why LIST interface methods are not asked to be implemented? rather its optional
    but when we create a new interface and add some methods, they need to be used mandatorily.

  • @addy0507
    @addy0507 5 років тому

    Thanks

  • @dbaskaran22
    @dbaskaran22 5 років тому

    Good one.

  • @WaleedAhmadArain
    @WaleedAhmadArain 5 років тому +1

    example is quite vague. adding so much extra sentences in your statements

  • @unemployedcse3514
    @unemployedcse3514 2 роки тому

    Always Awesome ❤️

  • @blablablahh612
    @blablablahh612 6 років тому

    what if I want to use student class eg: Container obj=new Container(); how will i write my student class then? i am confused

  • @random-0
    @random-0 4 роки тому

    thanks

  • @abhib4390
    @abhib4390 2 роки тому

    You teach good

  • @divyeshkumarbalar7732
    @divyeshkumarbalar7732 6 років тому

    I dont know why, but i am not being able to jump to implementation of any java inbuilt classes?
    Any help!

  • @TheDivyansh007
    @TheDivyansh007 2 роки тому

    Thank you :)

  • @Goateduzi
    @Goateduzi 6 років тому

    Great video