Polymorphism in Java - Concept | Compile time and Runtime | Overloading and Overriding | Code Decode

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ส.ค. 2024
  • Ability of an object to take
    Many forms. Any object in java that passes IS-A test is polymorphic and since all objects extends Object class hence all object are polymorphic.
    Udemy Course of Code Decode on Microservice k8s AWS CICD link:
    openinapp.co/udemycourse
    Course Description Video :
    yt.openinapp.co/dmjvd
    To implement polymorphism in java we have 2 ways :
    Static can be implemented by overloading
    Dynamic can be implemented by Overriding
    If child class has same method (with same signature) as defined in parent class is overriding
    A process in which a call to overridden method is resolved at runtime rather than compile time.
    Methods having same names but different Parameters is method overloading. Eg
    Add(a,b) and Add(a,b,c)
    Both methods add all arguments
    ----------------------------------------------------------------------------------------------------------------------------------------
    #polymorphism #java #polymorphism
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Well u have created the best playlist of JAVA on youtube..Specially for interview preparation! Thank you so much

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

      Thanks for nice words Disha

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

    Effective videos, all to the point; great for everyone whether fresher or someone experienced who wants to quickly revise ,
    much better than reading theory & 3 hour long videos available otherwise.
    Just a suggestion, please explain method Signature just in the starting of video with example.
    As you said mostly people confuse between types & return types.

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

      Sure Amrit 👍👍thanks 🙂🙂

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

    This video helped me understand the runtime polymorphism very nicely. Which used to confuse me since 1 year

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

      Glad to hear that girl ❤️

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

    Thanks a lot for all of your hard work , it helps me to crack different interview

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

      Thanks Suman 👍🙂

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

    Very clear explanation. Thank you for this video. 💚💚

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

      Thanks 🙂👍👍

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

    9:58 "chota diba can be sent to the bigger box"
    btw very clear explanation. Thanks a lot for all of your hard work.

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

      Kabhi kabhi Mother tongue nikal jati h excitement me 😄

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

    Very good explanation. Thank You.

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

    Hello! One small thing about the type promotion: 8:20.
    Number 5 can be promoted to bigger primitive type, e.g. long, or autoboxed to Integer. However it cannot be promoted and autoboxed at the same time. So 5 cannot be promoted to Long.

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

    Please keep uploading such videos.

  • @sunainanavas132
    @sunainanavas132 4 หลายเดือนก่อน +1

    Great explanation..Keep up the good work🎉🎉🎉

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

      Thanks 😊

  • @vinaykumar-zk8yr
    @vinaykumar-zk8yr 9 หลายเดือนก่อน +1

    Thank you ma'am

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

      You are welcome

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

    Osm video
    Can we get your notes?

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

    Great🤗

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

    Nice explanation

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

      Thanks :)

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

      Welcome

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

      @@CodeDecode what is method of achieving polymorphic behaviour

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

      Answer depends on what type of polymorphism you require to implement.

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

      If it's static then you can implement that using overloading
      If you wanna achieve dynamic polymorphism then implement method overriding.
      Hope this answers your question

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

    1:25 i head 'matlab' i understood that!

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

    all ur efforts goes vain bcz even though it is theory video adding example would have benefited the viewers much better

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

      Well I don't think so. We do have video with examples. Please check that out before commenting. 👍

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

      Links
      th-cam.com/video/msnpR4xcflc/w-d-xo.html

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

      Link for dynamic polymorphism example:
      th-cam.com/video/4oEgPfu-4fY/w-d-xo.html