55 Java Superclass Subclass Typecasting |

preview_player
Показать описание
"Learn How To Design + Code A Complete App From Scratch To Playstore"
-~-~~-~~~-~~-~-

This Java tutorial video talks about typecasting between superclass and subclass objects in Java, A superclass reference variable can refer to subclass objects, however the reverse requires explicit cast operator to typecast. It may throw a ClassCastException if the typecasting is attempted between incompatible objects.

OUR WEBSITE

OUR SOCIAL LINKS
Follow us on
Рекомендации по теме
Комментарии
Автор

kindly read the announcement under community tab people, this channel s shutting down and we are moving to something else thanks

slidenerd
Автор

slidenerd is the best YouTube channel for Java tutorial, i've never ever seen. awsm bro. thanks

sundaraprakash
Автор

YOU ROCK! I went through a few tutorials and your explanation is THE BEST! No more tutorial search for me. Thanks to you!

fcap_
Автор

Excellent explanation. Was stuck for 2 days and finally got the explanation here. Thankss👍

mayankjindal
Автор

I was struggling to understand polymorphic casting until i find this vídeo! Very effective and simple explanation! Congrats and thanks a lot for your Help! Just loved it!

kukudilu
Автор

I like how you explain what you are teaching. The best I've seen so far. Here's a question - in creating Person p2=new Student(), how is the reference variable p2 any different then s2 in creating Student s2=new Student()? Won't they both be able to refer to all the variables in the Student Object the same way? If true, then what would be the purpose of creating p2 of Person type to refer to a Student Object?

StevenVWms
Автор

And once again, you saved my day. Thanks bro.

muhammadmuneebkhanafridi
Автор

great vidoe, your English very clear, contend very clear

ridvanusa
Автор

I like your tutorials so much that I've disabled adBlock :3

Caqtus
Автор

thankyou so much! you saved my grade on my midterm tomorrow (hopefully), you're the only person that I can understand when explaining Java!

explodingpizza
Автор

sir, ur teachings are pretty good.please post a video on "instanceof"operator as soon as possible

pradeeps
Автор

You sound like a lawyer at 1.5x. Thanks for the video, cleared my concept.

ojasio
Автор

please post about interfaces and multithreading... BTW your teaching is awsome.. you are the best teacher i ever seen.. thanks a lot

rithikshaonlineboutique
Автор

237 FREE Java slides!!!
These slides teach you everything you need to get started with Java programming. I will be adding a PART 3 in addition to the two parts that will cover more complex topics. I was so excited with these that I couldn't wait to upload it ASAP!

slidenerd
Автор

I struggle to understand that concept of Person p = new Student() when he says at 05:15 that object p has five available fields - name, age, address, marks and rollNumber because still when we try to use p.marks or p.rollNumber - compiler shows error. So what actually means that Person p = new Student() has five fields available?

DavidM_
Автор

Hi Vivz, @9:20 you said P2(=new student) has a student object inside it and hence can be used for typecasting.However I saw that even reference variable p (which = new Person) can be used for the same.Am I correct ? Great videos btw.

amankul-yt
Автор

Why can't I watch your java course on Coursetro? It says: the video can't be loaded because the format is not supported or the network faild! I tried from different device but the same problem! Please fix it as soon as possible! Thanks

omleen
Автор

Can you give me Slides that you are use in your Videos

akashkumarkhatri