#6.4 Java Tutorial | Method Overriding | Super Keyword

preview_player
Показать описание
Method Overriding:
what we have been discussed in this lecture?
a)method overriding
b)use of super keyword

What is method Overriding?
It is way to override the parent class method in child class .

class Parent{
int a;
}
class Child extends Parents{
int a=10; //override a

public void useParentShow(){
}
}

class Main{
public static void main(String []args){
Child c=new Child();
}

}

b) Now you are interested to use parents class show() then for that super keyword come into picture
whenever you want to use parents class method or variable in child class then we can use it by super keyword;

class Child extends Parents{
int a=10; //override a

public void useParentShow(){
}
}

More Learning :

Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
Рекомендации по теме
Комментарии
Автор

Finally somebody who knows how to explain concept in a simple way!!

xRaido
Автор

This guy make things that are explained so complexly so simple.

ChildOfTheUniverse
Автор

i've never seen somebody explaining the concepts in such a small time and with a good explanation.

ronakpatil
Автор

The @Override annotation is the best thing I discovered. Thank you Navin Sir.

ameyamarathe
Автор

I have watched a lot of videos about Java to help me out in my coding and your videos are simple straight to the core. I love it.

jplast
Автор

I’m a sophomore in high school and this was so easy to understand thank you so much you’re a lifesaver

airbudrocks
Автор

Thanks a lot sir, .. i having a doubt that why we should the keyword @Override. i asked in stackoverflow, searched in gfg but i didn't got the exact meaning why we using @Override keyword in order to override. actually, without using the word @Override, it getting override.. but u finally, given me the exact answer what i'm searching for. im very very happy, that i found it and understood deep enough with an example. thanks again sir. i proud that i subscribed to a channel a long back for a meaningful... thanks one more time sir. notification bell icon on <3

sathvikrijo
Автор

never believed oop concepts could be this much easier. and all credit goes to you sir

kuntalnandi
Автор

this guy has made the best explanation of method overriding

jahidsami
Автор

why do we pay university when we learn from youtube
btw amazing explanations throughout the series

PREMGUPTA-iwhx
Автор

You are the best teacher I have ever seen in English😍😍

surya-owwr
Автор

Your work is really huge ! Well done ! Keep on ...

vladanulardzic
Автор

Thank you for this video Navin. I have been searching all over to find a simple definition or example of method overriding. I was not satisfied. Finally saw your this video and now it is clear to me. Thank you for making it very simple with a nice example. It made me understand very easily. Thank yuh once again.

utpalsarker
Автор

I got the concept sirr, I am happpy sirr thanyouuuu sooo

Farahat
Автор

so good...on to the point explanation.

blaze
Автор

You made this topic very simple to understand, thank you very much

nissimcohen
Автор

You are genius sir I am understanding all your java tutorial thanks sir

ganesh
Автор

Thanks sir for explaining this concept in easy way and clear manner 👍

prikansiyadav
Автор

Thank youu, better than how my module taught me.

haroldtan
Автор

Sir your solve my puzzle and very simple, quickly explaination 👍

Nutan