Explore object casting in java | parent p = new child() | upcasting with dynamic method dispatch

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

ความคิดเห็น • 162

  • @michaelhall4602
    @michaelhall4602 11 วันที่ผ่านมา

    You have a gift. I know this is 6 years old, I hope you have since continued on and found a way to impact even more people with your teaching talents.

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

    This is best ever video of typecasting in youtube...thank you so much sir...

  • @SRUTHIS-w1j
    @SRUTHIS-w1j หลายเดือนก่อน

    Thank you so much 😀 all my doubts got clear. This is best ever video of typecasting in TH-cam...👏

  • @chaosdesigner123
    @chaosdesigner123 5 ปีที่แล้ว +10

    36:17 --> Key sentence of the whole talk imho

  • @matilda3990
    @matilda3990 3 ปีที่แล้ว

    Best video ever on Upcasting! + Description is lit Thank you, sir!

  • @mauryar16
    @mauryar16 4 ปีที่แล้ว

    Thanx fir this video...Finally I got clear idea about upcasting ...Thnx a lot

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

    What a clear cut video very very well understand very good work bro

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

    Wow easily understands one of the critical topics. Thanks for your effort Bro.

  • @AJ-rj6ee
    @AJ-rj6ee 2 ปีที่แล้ว

    This is what I needed... Explanation to the point... Great bro

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

    very Nice...Need ur downcasting video

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

    Finally i understood this java puzzle ! Thanks a lot !!

  • @rishisweeklydose5014
    @rishisweeklydose5014 4 ปีที่แล้ว

    What a explanation!!!all basics are cleared.

  • @comment4151
    @comment4151 3 ปีที่แล้ว

    Awesome explaination now I got full clarity on concept..I can visualize things now

  • @ayushijindal3899
    @ayushijindal3899 4 ปีที่แล้ว

    Your explanation was very sttraight forward and logical at the same time
    your video make me understand the concept of upcasting >THANK YOU SO MUCH

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

    Thank you so much !!! 👏 God bless you!

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

    Thank you so much 😀 almost all doubts got clear👏 God bless you!

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

    I really appreciate it! it's the best lecture I've ever seen of upcasting & down casting. I had hard time to understand of that. but I got it completely thanks to your thorough explanations! thanks again!!!👍👍👍👍🌹🌹🌹

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

    Thanks a lot Sir ji.. appreciate your efforts! 🇮🇳🙏🌈

  • @RajendraPrasad-yv1vs
    @RajendraPrasad-yv1vs 5 ปีที่แล้ว

    Explanation is very nice on Upcasting, Please upload video on Downcasting also.

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

    Very useful class, thanks a lot

  • @shreyanspoddar6596
    @shreyanspoddar6596 4 ปีที่แล้ว

    Excellent Video

  • @ramyaaddanki9665
    @ramyaaddanki9665 3 ปีที่แล้ว

    Hi Abhilash pls upload more videos.It is very resourceful.We could knew how it works in real time environment

  • @abhi9074470124
    @abhi9074470124 5 ปีที่แล้ว

    Super Amazing Excellent Explanation I have no enough word to express thanks

  • @bahubali.proddanavar6955
    @bahubali.proddanavar6955 5 ปีที่แล้ว +1

    Up Casting video is ultimate and well explained. Could you please provide down casting video too ?

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

    love you brother . you did underrstand me well ................

  • @rsn143
    @rsn143 3 ปีที่แล้ว

    well explained thanks a lot for making easy to understand

  • @nitinverma1330
    @nitinverma1330 3 ปีที่แล้ว

    Awesome examples

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

    Thank you.. ULTIMATE Lectures...keep it up

  • @ameeqhs
    @ameeqhs 3 ปีที่แล้ว

    On 31:00 you were upcasting "s" to "Object" type but class "Mobile" didn't extend the Object class. If I create the method "calling" in the Object class but without inheritance will it work. OR is inheritance important for upcasting and downcasting?

    • @KG-vo6rg
      @KG-vo6rg 3 ปีที่แล้ว

      Hi @ameek Khan, The object class is the base class for each and every java class. Hence, even if we do not explicitly extend the object class, in any of the classes that we create, it by default internally extends the object class internally.

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

      @@KG-vo6rg Thanks for the clarification.

  • @VijayPatel-pl3te
    @VijayPatel-pl3te 2 ปีที่แล้ว

    Really It was nice explanation

  • @mohammedabahussain4562
    @mohammedabahussain4562 4 ปีที่แล้ว

    MAN! , you are truly great.

  • @KG-vo6rg
    @KG-vo6rg 3 ปีที่แล้ว

    Thanks @seleniumExpress for such in detailed explanation. Can you please provide similar video for the downcasting stuff. Am sure people following your channel would be eager to watch that.

  • @sakthipriyar2902
    @sakthipriyar2902 6 ปีที่แล้ว +3

    Well explained!!! Is the video on downcasting uploaded?? If yes can u please share the link??

  • @lubaaish3578
    @lubaaish3578 4 ปีที่แล้ว

    outstanding brother

  • @Ri-hg6hs
    @Ri-hg6hs 5 ปีที่แล้ว

    Outstanding lecture 🤗
    Next durgasoft is here

  • @kavithakonal3799
    @kavithakonal3799 4 ปีที่แล้ว

    Super explaintion sir nailed it👌👌

    • @kavithakonal3799
      @kavithakonal3799 4 ปีที่แล้ว

      Please tell me the downcast video link.

  • @maddiletineeraja8169
    @maddiletineeraja8169 4 ปีที่แล้ว

    Nice explanation

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

    awesome bro, u elucidated it in outstanding manner.

  • @gopinathmurmu8074
    @gopinathmurmu8074 5 ปีที่แล้ว

    excellently explained.thanks

  • @ajitbehera4582
    @ajitbehera4582 6 ปีที่แล้ว

    sir, this video is now more clearer than any video..great work..do more videos and make videos on down casting,string and sorting as early as possible...

    • @SeleniumExpress
      @SeleniumExpress  6 ปีที่แล้ว

      Thanks, Ajit. Happy to know that it helped you.

  • @pravinsaha7249
    @pravinsaha7249 5 ปีที่แล้ว

    Excellent explanation sir !!!!!!

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

    Thx for clearing doubt

  • @binaryautomation-sdets2336
    @binaryautomation-sdets2336 4 ปีที่แล้ว

    awesome.. explained it really well..

  • @saithota001
    @saithota001 6 ปีที่แล้ว

    Nice explanation bro...u are giving more examples for better understanding. I like the way Ur explanation

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

    marvellous sir.., could u pls upload downcasting.. it will very helpful..

  • @balanssocial1880
    @balanssocial1880 6 ปีที่แล้ว

    Smart explanation with a simple example... taking greater effort to explain that should be understood by the viewers... kudos to you

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

    awesome video...waiting for down casting video :-)

    • @SeleniumExpress
      @SeleniumExpress  6 ปีที่แล้ว

      Sure Dilip. It will be published by the next week.

    • @hamidkhan262
      @hamidkhan262 6 ปีที่แล้ว

      I cant see the down casting video. Please give the link.

    • @mailme0646
      @mailme0646 3 ปีที่แล้ว

      Please upload down casting video.

  • @utkarshgupta2909
    @utkarshgupta2909 6 ปีที่แล้ว

    this video was great.. and clearly I got the idea why overriden methods are called run time polymorphism.. pease upload 2nd and 3rd video also...

  • @alexandrutudosan3319
    @alexandrutudosan3319 4 ปีที่แล้ว

    nice work

  • @tellavijayavardhanreddy2532
    @tellavijayavardhanreddy2532 6 ปีที่แล้ว

    Your classes are good please provide PDF notes for the videos.then it is easy to understand

  • @praveennalla3060
    @praveennalla3060 6 ปีที่แล้ว

    Awesome Explanation bro....!!

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

    more informative, thanks

  • @Ishnavvulu
    @Ishnavvulu 6 ปีที่แล้ว

    I am very clear the casting concept now.Thanks alot..Please do more videos u have very good future..:)

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

      Thanks, Teju Sree. I am glad to know that you found it helpful.

  • @himanigupta6693
    @himanigupta6693 5 ปีที่แล้ว

    Excellent.. keep it up.

  • @divyanshjain4802
    @divyanshjain4802 4 ปีที่แล้ว

    great lecture man! clear and comprehensive

  • @princekai972
    @princekai972 5 ปีที่แล้ว

    good lecture

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

    Tq so much🤗

  • @ManojGupta-kx9qv
    @ManojGupta-kx9qv 6 ปีที่แล้ว

    Awesome explanation ...Thanks a lot.

  • @ebsibakennady5737
    @ebsibakennady5737 6 ปีที่แล้ว

    Very very useful bro... please update downcasting video also

  • @chaipiyo
    @chaipiyo 4 ปีที่แล้ว

    great video..keep up the good work !!

  • @kiranmudumala5606
    @kiranmudumala5606 3 ปีที่แล้ว

    love your explanations alot. Great job!

  • @lakshmirs4319
    @lakshmirs4319 5 ปีที่แล้ว +7

    Hi, nice explanation. Can you please upload downcasting as well. !

  • @kuldippatil2006
    @kuldippatil2006 5 ปีที่แล้ว

    Nice explanation..
    Thanx..

  • @MrAbbasalrassam
    @MrAbbasalrassam 6 ปีที่แล้ว

    Oh my gosh!!! Your lecture is really really helpful? I like the way to keep repeating your explanation until it goes to the mind. !!!! Thank you so much following you from Seattle !! Amazon hope you will be in touch

  • @akulabhaskar3797
    @akulabhaskar3797 6 ปีที่แล้ว

    Thanks lot Abhilash ,,waiting for Downcasting

    • @akulabhaskar3797
      @akulabhaskar3797 6 ปีที่แล้ว

      Abhilash upcasting=(Java)a; :D :D

    • @SeleniumExpress
      @SeleniumExpress  6 ปีที่แล้ว

      Sure, Akula... It's going to take a while as I am busy with making some progress with spring tutorials these days.
      Thanks for watching 👍

  • @abdur_rehman5526
    @abdur_rehman5526 4 ปีที่แล้ว

    just awesome

  • @elahehajimohamadi9889
    @elahehajimohamadi9889 3 ปีที่แล้ว

    Explain is excellent,
    Please write the link of that you teach downcasting

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

    Best video, where is the downcasting video❤

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

    Awesome awesome

  • @kuldippatil2006
    @kuldippatil2006 5 ปีที่แล้ว

    Please make video on How these things works for method overloading..

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

    very helpful!

  • @TheMzA91
    @TheMzA91 6 ปีที่แล้ว

    Well done bro, love from Odisha, Waiting for more videos.

    • @SeleniumExpress
      @SeleniumExpress  6 ปีที่แล้ว

      High five 🙏 I am from Odisha too ☺

  • @rishikeshct4502
    @rishikeshct4502 6 ปีที่แล้ว

    Nice explaination!!
    Please use one plus as example 😃

  • @neseligezmeler1970
    @neseligezmeler1970 5 ปีที่แล้ว

    Thanks a lot

  • @yasararafath862
    @yasararafath862 4 ปีที่แล้ว

    Hi , i think for this concept 50ms is too much , Please make it short and your explanation very good .....

  • @dineshkumarpanda7287
    @dineshkumarpanda7287 5 ปีที่แล้ว

    Can you clarify what is that we cannot achieve using normal object, so we use upcasted object.

  • @lalitasharma353
    @lalitasharma353 5 ปีที่แล้ว

    Hey Abhilash, I have a doubt while going through an example based on this.
    class A{
    int i=10;
    }
    class B extends A{
    int i=20;
    }
    class Main {
    public static void main(String[] args) {
    A a = new B();
    syatem.out.println(a.i)
    }

    }
    When I am compiling this , i am getting output as 10....but as per your video, the child class overrides the parent class methods,
    as we are assing the object of B in ref of A

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

      class A{
      public void a(){
      int i=10;
      System.out.println(+i);
      }
      }
      class B extends A{
      public void a(){
      int i=20;
      System.out.println(+i);
      }
      }
      class Example2 {
      public static void main(String[] args) {
      A a = new B();
      a.a();
      }

      }
      just override method if you want your output as 20......

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

      In JAVA,we can override methods,variable can't be overriden!!

  • @vladanulardzic5859
    @vladanulardzic5859 5 ปีที่แล้ว

    Perfect ! Keep on ...

  • @bronsonantony8311
    @bronsonantony8311 5 ปีที่แล้ว

    good one.Kindly share the down casting link as well

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

    Class Demo1
    {
    Public void display()
    {
    System.out.println("hi");
    }
    }
    Class Demo2 extends Demo1
    {
    Public void display()
    {
    System.out.println("bye");
    }
    }
    Class Mainclass10
    {
    Public static void main(String[] args)
    {
    Demo1 d1=new Demo2();
    d1.display();//up casting
    }
    }
    Explain :why out put is Bye,
    In upcasting concept parent properties should display

    • @jasmeensingh940
      @jasmeensingh940 5 ปีที่แล้ว

      Hi Deepthi,
      It is so because in method overriding... for instance methods which overridden method is called depends upon the type of object which is being called and not upon the type of reference.

    • @venkatasubbareddy6179
      @venkatasubbareddy6179 4 ปีที่แล้ว

      Hi Deepti,
      Here by using parent class reference creating an object to the subclass.
      With this reference if we call any method which is available in the parent class, then at the time of run time JVM checks whether this method has been overridden in it's child class or not. If this calling method has been overridden, then it print overridden method's output (from child class method). Otherwise it prints parent class method data.
      In your example, the method has been overridden in the child class, that's why you got child class method output.

  • @praveenkasam1185
    @praveenkasam1185 6 ปีที่แล้ว

    Good one.

  • @zebibaabdela9633
    @zebibaabdela9633 4 ปีที่แล้ว

    Thanks dear

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

    sir I want to that you share another video about down casting like similar to this video ?

  • @siddhantjaiswal3077
    @siddhantjaiswal3077 6 ปีที่แล้ว

    Nice explanation sir......keep doing 😊

  • @rahularora2936
    @rahularora2936 3 ปีที่แล้ว

    good

  • @faizulislam5096
    @faizulislam5096 5 ปีที่แล้ว

    Bhai can you please prepare a video on singleton design pattern and how can we prevent it from breaching.

  • @Crox--Youtube--Channel
    @Crox--Youtube--Channel 6 ปีที่แล้ว +1

    a obj = new a();
    What does a() constructor actually do ? please explain more deeply . It's confusing

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

      Crox what do you mean!! Your declaring a reference variable(obj) pointed to the class A
      . The obj will go looking for the constructor if it’s defined will implement it or it will run the default constructor behind the scene

    • @Crox--Youtube--Channel
      @Crox--Youtube--Channel 6 ปีที่แล้ว

      Now i finally understand ...thanks for helping out

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

    where is the link of downcasting video, can u pleas provide

  • @dev3595
    @dev3595 3 ปีที่แล้ว

    Bro make selenium interview questions and answer ...
    u can also state a API series

  • @SHAIKBASHA-mk9in
    @SHAIKBASHA-mk9in 4 ปีที่แล้ว

    Hi,
    I am unable to find the link for downcasting in Java, I have watched upcasting videos, it was very nice.Please provide the link for Downcasting tutorial.

  • @bahubali.proddanavar6955
    @bahubali.proddanavar6955 5 ปีที่แล้ว

    i subscribed your channel.

  • @harmonywithin8084
    @harmonywithin8084 3 ปีที่แล้ว

    thank you

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

    When you will upload downcasting video

  • @nutanpawar1594
    @nutanpawar1594 5 ปีที่แล้ว

    This video is very useful but unable to find downcasting video.could you please help with the link of that?

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

    Link for Downcasting ??? Please

  • @محمودطلبهاحمدمحمدمقبل
    @محمودطلبهاحمدمحمدمقبل 3 ปีที่แล้ว

    amaaaaaaaaaaaaaaaaaazing

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

    right right right!!!!!

  • @SRUTHIS-w1j
    @SRUTHIS-w1j หลายเดือนก่อน

    I can't find out video for downcasting ? is it there ?

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

    Hi, where is down casting?

  • @chavamanish4626
    @chavamanish4626 4 ปีที่แล้ว

    Hello sir I have a question that I got in my exam. So say Bite b=new Drink() ; here Bite is super class and Drink is child class. In exam the question was what will be answer of b. Method2() which is not present in both the classes mentioned above but this method2() is present in parent class of Bite class. So what will be the answer to this. Thank you

    • @dangcuong379
      @dangcuong379 4 ปีที่แล้ว

      there won't have error.