Upcasting vs Downcasting in Java With Program Example

  Рет қаралды 63,054

Simple Snippets

Simple Snippets

Күн бұрын

Пікірлер: 82
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌
@govindmusic_1
@govindmusic_1 2 жыл бұрын
after searching and watching more than .10 videos .. Trust me This is the best video i found who made me understood what is downcasting and upcasting as well as use of instanceOf.. Very nice bro .. Thank you sooo much
@kapilsharma6046
@kapilsharma6046 Жыл бұрын
this is the best simplest upcasting and downcasting explanation in detail, thanx bro
@kiranmaiganapuram9079
@kiranmaiganapuram9079 3 жыл бұрын
well explained brother. after wasting 3 days searching for casting videos. this is really helpful. finally i undestood the topic. thankyou :)
@abbyboing
@abbyboing 4 жыл бұрын
Thanks a lot for explaining this dude. I've been super confused on this topic for a long time.
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Glad to help!✌
@pulkitsharma5792
@pulkitsharma5792 4 жыл бұрын
Thanks alot brother after watching many videos still have doubts which are clear now
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Glad to hear that
@zaur884
@zaur884 3 жыл бұрын
Thanks for your good explanation. Perfect 👍.
@angulardesign7412
@angulardesign7412 5 жыл бұрын
Hatts off to u . U cleared my doubt thank u
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Most welcome bro 😁 I'm glad that this video helped you. Please do share it with your friends ✌️
@piyushbarhate1481
@piyushbarhate1481 7 ай бұрын
Thanks bro for great explanation...
@rupeshkumarpadhi9060
@rupeshkumarpadhi9060 3 жыл бұрын
Thank you so much...now my doubt is cleared
@anithakota2540
@anithakota2540 4 жыл бұрын
It's very clear explanation. Thank you so much....
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Thanks buddy! Please share the videos with your friends if you want to genuinely support me & our channel!✌😇
@rohitghadge9173
@rohitghadge9173 4 жыл бұрын
very nice explanations thanks alot
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Thanks Rohit! please do share the video and our channel with your friends too. Thats the biggest help and support 😇
@ksdnsdkumar1375
@ksdnsdkumar1375 2 жыл бұрын
What's the difference between downcasting and directly creating child object in java?
@universalgamers2524
@universalgamers2524 2 жыл бұрын
very nice website. fully user friendly love it..!
@Unkn0wn_Legend000
@Unkn0wn_Legend000 3 жыл бұрын
great video... although I had to watch it twice bcz your last examples, whether where we can use up & down casting made my concepts clear .... so I hade to give it another look to get it on board.....
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
Glad it was helpful! Thank you so much buddy. It would mean a lot if you could please share our channel and videos with your friends too ✌
@swathinarayanamoorthy5199
@swathinarayanamoorthy5199 Жыл бұрын
tq so much sir i uderstood very well
@nachiketjoshi3878
@nachiketjoshi3878 4 жыл бұрын
Best explanation of type casting thank u
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Thank you so much Nachiket bro 🤟😊 please do Subscribe & share our channel with your friends to. That's the biggest help and support from you 🙏
@AntonyDavid37
@AntonyDavid37 3 жыл бұрын
Thank you! Good Explanation. One Doubt... Instead of doing Downcasting, Why can't we go like Child c = new Child(); ???
@IluSsIoNnN
@IluSsIoNnN 2 жыл бұрын
Because you would creat another object and maybe you don't want that.
@salqarni6682
@salqarni6682 3 жыл бұрын
thank you so muchh it was very clear and finallyy i understand it!!
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
Glad it helped! Please do share the videos and channel with your friends too. Thats the biggest help and support you can give!
@amithghosh3332
@amithghosh3332 4 жыл бұрын
you are the best.... after this, i got a lot of clarity. thanks
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Glad to hear that! Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@programmingforfun4158
@programmingforfun4158 3 жыл бұрын
The best guy in java. I can surely say.
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
🙌❤️🙌
@sanketpatil3243
@sanketpatil3243 2 жыл бұрын
But if I create a object of child class with reference of child class so why need to do down casting? i can access the overridden method & unique method of child by using that object
@KG-vo6rg
@KG-vo6rg 4 жыл бұрын
one of the best explanations seen for such concepts.. Nice one.
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
I am glad you liked this tutorial buddy, please do share the video with your friends too ✌
@tanunjoyroy799
@tanunjoyroy799 4 жыл бұрын
hey I have a question regarding your real-time example of upcasting you mentioned "Upcasting is used when we want to refer multiple child classes by a single parent object N we want to call their respective overridden methods at a particular time when necessary" Could you please elaborate specifically on what did you mean by referencing them at a particular time when necessary? let's say we have 2 child classes child() & child1() N we create Parent p1=new child(); so my question is do we need to create another Parent class object ref Parent p2=new child1(); for child1()? If that's the case then let's say we have 20 child methods for each of them we need to create p3....p20 then where is the benefit here of using upcasting? I just want to know from the perspective of benefits of using upcasting when we have multiple child classes I hope I am clear :) waiting for your response
@safronee
@safronee 4 жыл бұрын
Benefit is in the case of security like we dont want to let the user use unique methods only want him or her to use overriden method only but at the same time we want to allow him to use unique to like we might ask him a security code from him and then let him use the unique methods also so these are used in the case of security purposes...
@RahulTetwar
@RahulTetwar 2 жыл бұрын
dude you explain better than my teacher
@SimpleSnippets
@SimpleSnippets 2 жыл бұрын
Thank you Rahul 🤟😊
@aidasiempre
@aidasiempre 3 жыл бұрын
nice video! thanks!
@nethmiwijebandara3315
@nethmiwijebandara3315 4 жыл бұрын
Well explained. Thank you!
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Glad it was helpful! Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@shashankshetty5879
@shashankshetty5879 4 жыл бұрын
But what's the use of down casting u created an object of a bmchild class and refereed it to parent class and u are accessing a method of that child class so even if u don't reffer or downcast I will be able to access the methid(unique method in this exmple)👀👀
@shubhankardamodare4745
@shubhankardamodare4745 4 жыл бұрын
Your website is awesome!
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Glad you think so! ✌
@NavJaswal
@NavJaswal 5 жыл бұрын
Very well explained. Thank you.
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Thank you buddy 😇 please do share the video with your friends too ✌️
@ashoksamal8079
@ashoksamal8079 4 жыл бұрын
Thanks Brother, It helped.
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Glad it helped. Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@mrudulaahire1360
@mrudulaahire1360 3 жыл бұрын
Why Child c = new parent() gives an error, why is it not allowed?
@josephmartinez470
@josephmartinez470 3 жыл бұрын
Because child class extends from the parent class
@pup_lover
@pup_lover 3 жыл бұрын
Well explained 👍
@SimpleSnippets
@SimpleSnippets 3 жыл бұрын
Glad you liked it
@rahatulashekinashik
@rahatulashekinashik 4 жыл бұрын
That was great! Thanks
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
You're welcome! Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@indurathour3301
@indurathour3301 3 жыл бұрын
Great👍
@weaammohamed3601
@weaammohamed3601 4 жыл бұрын
great
@touseefcheema2557
@touseefcheema2557 5 жыл бұрын
Thank you
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Most welcome buddy. Please do share :-)
@shivpatel8288
@shivpatel8288 4 жыл бұрын
Amazing Video Bro!
@SimpleSnippets
@SimpleSnippets 4 жыл бұрын
Thanks 🔥 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@rahularora2936
@rahularora2936 3 жыл бұрын
good vid
@Prathik7000
@Prathik7000 5 жыл бұрын
One doubt, Y create object of parent to call method of child?
@tusharikas5447
@tusharikas5447 5 жыл бұрын
that is method overriding concept . Just go through the link -> kzbin.info/www/bejne/lWOZqYqiqtmcna8
@biswajitsahoo1456
@biswajitsahoo1456 4 жыл бұрын
@@tusharikas5447 bro we can also call the overiden method of child class by using child class object also but why we use parent class obj as upcasting to call child class method????....🤔
@aravindalluri1738
@aravindalluri1738 5 жыл бұрын
is it the parent object or parent reference?.
@Dem169
@Dem169 2 жыл бұрын
Parent p= new child() Here p is object of child But he said p is parent object ,🤔
@virendrachavan9201
@virendrachavan9201 5 жыл бұрын
Good
@ChessNetwork16
@ChessNetwork16 5 жыл бұрын
give your site's link here.
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
www.simplesnippets.tech
@shahdabtemori5930
@shahdabtemori5930 5 жыл бұрын
before watching this i hv watched hundreds of videos .. when ever m stuck with some thing i dont get it easyly.... programing sometimes screw my f****ng head...
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Hehehe I can feel you buddy. Same happens to be quite often. Good to hear that you didnt give up even after watching so many videos 😇 Also I new video is coming up tomorrow on how to improve your programming skills so stay tuned for that ✌
@bilalsayyed4158
@bilalsayyed4158 Жыл бұрын
🎉🎉
@muhammadhuzaifa8570
@muhammadhuzaifa8570 5 жыл бұрын
nice
@SimpleSnippets
@SimpleSnippets 5 жыл бұрын
Thank you so much buddy ✌
@___llvm
@___llvm 3 жыл бұрын
cool
@koreancaptain2955
@koreancaptain2955 5 жыл бұрын
music in starting is irritating
Java Wrapper Classes | Autoboxing vs Unboxing with Program Example
9:56
Simple Snippets
Рет қаралды 4,7 М.
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 12 МЛН
MY HEIGHT vs MrBEAST CREW 🙈📏
00:22
Celine Dept
Рет қаралды 81 МЛН
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 42 МЛН
Upcasting and Downcasting in Java - Full Tutorial
10:22
Coding with John
Рет қаралды 177 М.
Java Interfaces Explained with Complete Theory & Program Example
19:00
Java Stacks & Heap | Memory Management
11:03
Simple Snippets
Рет қаралды 4,4 М.
Casting an Object (Upcasting and Downcasting) - Java Tutorial
5:53
Upcasting and Downcasting in Java| lec 49 | Java Tutorial| BhanuPriya
15:41
#59 Upcasting and Downcasting in Java
6:37
Telusko
Рет қаралды 108 М.
Difference between Parent p = new Child(); and Child c = new Child();
9:23
REAL 3D brush can draw grass Life Hack #shorts #lifehacks
00:42
MrMaximus
Рет қаралды 12 МЛН