The best video tutorial to understand Polymorphism. Simply Awesome 👌👌👌
@rohittakalkar92528 ай бұрын
[Important to understand]: Only overridden methods/properties in the child class are accessible through a reference to the parent class pointing to an instance of the child class, but other properties or methods specific to the child class won't be directly accessible through that reference And this is the reason why overriding is taught before polymorphism.
@snooringcode65944 жыл бұрын
Videos like this really deserve a like. Make a video on interface and how it is beneficial in multiple inheritance.
@CheezyCode4 жыл бұрын
Sure brother in progress
@TheAbhidugar3 жыл бұрын
4:58 agar child classes me new methods add hote hai aur unhe access karne ke liye naya object banana padega? like: val circle = Circle(). btw aapki saari videos me dekh raha hu kotlin ki. isse badhiya explanation kahin nahi hai. aapne har point ko explain kia hai. Polymorphism ka advantage aaj pura clear ho gaya jabki me java ab kuch se kar bhi raha tha. par ab saat janmon tak yaad rahega. thank you cheezy bhaiya.
@CheezyCode3 жыл бұрын
Thank you Abhishek. Yes in that case reference should be of type circle then only you will be able to call new methods of circle. Aur comment ne dil khush kardiya....😁abstract aur interface aur jyada majja aayega... Insta pe short notes bhi hai...Ho ske toh please share these videos...
@TheAbhidugar3 жыл бұрын
@@CheezyCode hanji bas aaj kotlin puri kar leni fir Android shuru karna
@anmolverma075 Жыл бұрын
Sir ,really a great explanation! Jaise aap smjhate ho ,blkl next level hai!
@riteshmukhopadhyay69223 жыл бұрын
It was hard to grasp in the beginning but after reading few articles and again watching your video, run time polymorphism is crystal clear. And you had already explained compile-time polymorphism that technique is function overloading, right? Thanks, Cheezy guy👏🙌
@CheezyCode3 жыл бұрын
Polymorphism ka actual meaning dynamism se hai...but kaafi books overloading ko compile time polymorphism btati hai...toh consider kar skte ho...but crux yehi hai ki code future ready hojata hai if we use it correctly
@riteshmukhopadhyay69223 жыл бұрын
@@CheezyCode ooh ye nhi malum tha, thanks for the info 😁👍
@CheezyCode2 жыл бұрын
Dynamic method dispatch is a way of implementation of polymorphism in Java or Kotlin....
@chndraja3 жыл бұрын
Type inference was amazing... Thank you for this amazing video....
@ManishKumar-eh4ol3 жыл бұрын
Best lectures on kotlin
@CheezyCode3 жыл бұрын
Thank you 🤘
@shahriarsharif67363 жыл бұрын
Thank you from Bangladesh. Please add English subtitle.
@naimeimran32473 жыл бұрын
Thanks Sir
@amanjotkaur39642 жыл бұрын
Usefull vedio don't miss
@CheezyCode2 жыл бұрын
Thanks Daman
@wasimakrambiswas42163 жыл бұрын
I am new in kotlin .I might be wrong . but In General term it is not satisfying rules of POLYMORPHISM . it is satisfying concept about " CASTING " ...
@CheezyCode3 жыл бұрын
Let's discuss 🙂
@CheezyCode3 жыл бұрын
Waise ye crux hai iska - jab thoda code likhoge toh clear hojayega ..it is same as any other programming language. I have explained the advantage we get by writing polymorphic code..
@wasimakrambiswas42163 жыл бұрын
Okk ... Thank you ... 🙂
@cheems08213 Жыл бұрын
sir im confused, i think polymorphism is function overloading and overriding, what you have explained in the video is upcasting
@CheezyCode Жыл бұрын
Overriding ka benefit kya h?... Object hold kar rahe ho parent object mei but uske andar child ka object bhi ho skta hai. Runtime pe decide hota h ki actually mei parent ka reference kis object ko hold kar rha h...jis bhi child object ko hold kar rha hoga uska method call kar diya jata hai...this is polymorphism. This is not upcasting. This is how polymorphism works i.e. at runtime it is decided to call the method based on the type of the object. Upcasting is simply holding a child object inside parent reference. For e.g. in Java - I can do this Object o = any object This is upcasting because Object is the parent class of all the objects. I can safely store any object using parent's reference. Let me know if you need more clarity. Or you can refer good sources like Head First for more information. I have read Head First Java thrice to clear these OOPs concept.
@cheems08213 Жыл бұрын
@@CheezyCode ok sir thank you for replying, ill definitely read more on this topic
@kaushikpaul65833 жыл бұрын
Hii, here circle and shape are the base class reference, holding the memory of Circle & Square class objects respectively. But later u have created array of objects of three different classes which are passed to the calculateArea() and then individual objects stored as array elements are called and it is obvious that it will call its own memory locations. Then there is no use of the first two lines written in main()?? I can omit that...right?? Please guide
@CheezyCode3 жыл бұрын
Yes...no need of those 2 lines then.... Main point of this video - in calculate areas method you can pass object of any class that inherits from shape class. Whether you have that in your project currently or a new class will be added in future. Body of that method will remain unchanged.
@fitnessbrandspormotion Жыл бұрын
4:58
@tuananhtran7518 Жыл бұрын
please turn on subtitles :(
@ksujalpatel2 жыл бұрын
Examples maybe made more easier to understand
@CheezyCode2 жыл бұрын
Examples are based on continuation...I am assuming you have watched previous videos as well...just for OOPs concept...if you start from classes and objects video - it will make more sense...
@ksujalpatel2 жыл бұрын
@@CheezyCode you done really Good Job, i appreciated Thanks you !
@nikhilmandlik3553 жыл бұрын
It's Upcasting
@CheezyCode3 жыл бұрын
No it's not...
@CheezyCode3 жыл бұрын
Watch its other part too - you will be able to understand the real polymorphism...I have explained the crux of this...things will make sense when you will write more code using this approach
@ronitrojasara2 жыл бұрын
hey! search on the internet it is not polymorphism
@CheezyCode2 жыл бұрын
Ok
@CheezyCode2 жыл бұрын
Please provide the links as well for more information.... Thanks
@CheezyCode2 жыл бұрын
Ek info meri taraf se - keywords ka koi mol nahi h....concepts clear hone chaiye
@007ayansinha4 жыл бұрын
isko polymorphism nai upcasting kehte hai 🙄
@jatinvashisht42933 жыл бұрын
Clear your basics bro !
@007ayansinha3 жыл бұрын
@@jatinvashisht4293 How well versed are you in Object-oriented? please watch 3:10 again and it will clear your doubt. Anyway its ok to live like as an ok, if even if you don't make it further.
@CheezyCode3 жыл бұрын
It's ok guys...let it be....I have created this video based on my knowledge for over 11 years. Just appreciate the whole concept whether it's upcasting or polymorphism. But just to be clear - watch the whole video - polymorphism is only possible if we have upcasting. I have written 2 points for the complete definition. 1st point is upcasting and other one is just using that concept. Both points are required. Cheers from CheezyCode 🤘
@007ayansinha3 жыл бұрын
@@CheezyCode appreciated for clarification, anyway watched all your videos on Kotlin. Really helpful. Looking more :-)