Java method overriding 🙅‍♂️

preview_player
Показать описание
java method overriding tutorial

#java #method #overriding
Рекомендации по теме
Комментарии
Автор


public class Main {

public static void main(String[] args) {

// method overriding = Declaring a method in sub class,
is already present in parent class.
so that a child class can give its own implementation

Animal animal = new Animal();
Dog dog = new Dog();

dog.speak();

}
}

public class Animal {



void speak() {
System.out.println("The animal speaks");
}

public class Dog extends Animal{

@Override
void speak() {
System.out.println("The dog goes *bark*");
}
}

BroCodez
Автор

holy sh... i thought that @override is a keyword that really does something but its not even necessary haha tnx 4 the explanation bro good job

glefordbanglayan
Автор

You are a better instructor than my professor at school.

archerxx
Автор

I have never coded in Java and I always wondered what this annotation does .. thanks for clarifying so concisely

chakreshsingh
Автор

Your videos are getting me through college better than my textbook! Thank you!

Katie-zkxs
Автор

I love the videos man. They are straight to the point with no excess bs in-between 🧡

Joseph-ghib
Автор

Thank you so much for your incredible tutorials. You always manage to teach me more things in 10 minutes compared to my professor's 2 hour lectures.

nikoskephalas
Автор

This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro

pavelkvasnicka
Автор

probably one of the most comprehensive java tutorials, without cutting corners :D

professionalaveragekid
Автор

Good explanation... easy to understand

bogdanbortosu
Автор

Thanks man, Java has been kickin gmy but for a while but your videos are a big help!

timothymcbearington
Автор

Wow! I failed a project last week and my teacher told me to re-do my project to pass it before going to the next module and I'm not gonna lie... I failed it hard at 30% and couldn't grasp anything about it. You made it so clear with this video that now my codes are all working like they should. Now, I should pass this project. I always come back to your videos because I just don't understand my teacher and you explain so well. Thank you!!!

PektraMom
Автор

Thank you for making this concept easier and more understandable for me

sebitboth
Автор

Brooo you are goated at explaining JAVA . You make this simpler to understand

furydjin
Автор

Gotta love when the textbook takes 10x longer to say the same thing in a less intuitive way. Thx bro.

eugenekrabs
Автор

Best explanation I found on this topic!

soronity
Автор

hey bro, this is very clear, love your content! keep going!

allenxu
Автор

Hi Bro Code, thank you very much for taking the time to provide useful information.

safakakin
Автор

I was suffering for understanding this overriding, but with your help, it seems coming to the end.

bozkurtburhan
Автор

The best explanation for method overriding.

miteshbarnwal