//********************************************* public class Main { public static void main(String[] args) { // method overriding = Declaring a method in sub class, // which is already present in parent class. // done 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*"); } } //*********************************************
@ManishKumar-xw3gs Жыл бұрын
I have an important question: why do we override methods in java if we can create a new method in sub class with a different name??
@aligmayu53224 жыл бұрын
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
@BroCodez4 жыл бұрын
thanks for watching gleford. Yeah it's considered good practice to add @Override, but I always forget 😂
@carsanovadidrifto8002 жыл бұрын
Hey fam, I hope that you and your loved ones are well. I would like to ask you the most important question ever asked: Who is Jesus? Not who is He to you. Rather, who is He really? Jesus is the Son of God, who came to the world as a man. He lived a perfect and sinless life . Even though He was perfect and sinless, on the cross of Calvary God wrathfully punished Him for the sins of the world. 3 days later He rose from death. Now He is seated at the right hand of God, ruling as King over Heaven and Earth. On the judgment day He will judge you, me and every human being that has ever lived. Those who believed in Him will enter eternal joy with Him, but those who did not believe in Jesus will be sent to eternal condemnation. So turn from your sins and believe in the Jesus. Believe and hope that you can be forgiven for all your sins because of His death and resurrection. He took your place in Hell, so that if you submit to Him as your Lord and God, you can be forgiven and take His place in heaven- you will be made sinnless and perfect before the Holy Father. He'll also give you a new heart and mind that can love and obey Him. Jesus lives so that you can have true life and freedom, and most importantly so that you can have an eternally peaceful relationship with God. You are dead, and Jesus is your Hope of love. Acts 15:11 ”On the contrary, we believe it is through the grace of the Lord Jesus that we are saved, just as they are." Ephesians 1:7 ”In Him, we have redemption through His blood, the forgiveness of our trespasses, according to the riches of His grace" Ephesians 2:8 ”For it is by grace you have been saved through faith, and this not from yourselves; it is the gift of God,” John 11:25-26: "Jesus said to her, 'I am the resurrection and the life. The one who believes in me will live, even though they die; and whoever lives by believing in me will never die. Do you believe this?' 1 Corinthians 6:14: "And God raised the Lord and will also raise us up by his power." Romans 6:9: "We know that Christ, being raised from the dead, will never die again; death no longer has dominion over him."
@carsanovadidrifto8002 жыл бұрын
@@BroCodez Hey fam, I hope that you and your loved ones are well. I would like to ask you the most important question ever asked: Who is Jesus? Not who is He to you. Rather, who is He really? Jesus is the Son of God, who came to the world as a man. He lived a perfect and sinless life . Even though He was perfect and sinless, on the cross of Calvary God wrathfully punished Him for the sins of the world. 3 days later He rose from death. Now He is seated at the right hand of God, ruling as King over Heaven and Earth. On the judgment day He will judge you, me and every human being that has ever lived. Those who believed in Him will enter eternal joy with Him, but those who did not believe in Jesus will be sent to eternal condemnation. So turn from your sins and believe in the Jesus. Believe and hope that you can be forgiven for all your sins because of His death and resurrection. He took your place in Hell, so that if you submit to Him as your Lord and God, you can be forgiven and take His place in heaven- you will be made sinnless and perfect before the Holy Father. He'll also give you a new heart and mind that can love and obey Him. Jesus lives so that you can have true life and freedom, and most importantly so that you can have an eternally peaceful relationship with God. You are dead, and Jesus is your Hope of love. Acts 15:11 ”On the contrary, we believe it is through the grace of the Lord Jesus that we are saved, just as they are." Ephesians 1:7 ”In Him, we have redemption through His blood, the forgiveness of our trespasses, according to the riches of His grace" Ephesians 2:8 ”For it is by grace you have been saved through faith, and this not from yourselves; it is the gift of God,” John 11:25-26: "Jesus said to her, 'I am the resurrection and the life. The one who believes in me will live, even though they die; and whoever lives by believing in me will never die. Do you believe this?' 1 Corinthians 6:14: "And God raised the Lord and will also raise us up by his power." Romans 6:9: "We know that Christ, being raised from the dead, will never die again; death no longer has dominion over him."
@EdgeLordOmen10 ай бұрын
you programmer now bro
@ttttkk229 күн бұрын
@@BroCodez but in android java programming, it does show an error and force me to add @override keyword
@archerx91x604 жыл бұрын
You are a better instructor than my professor at school.
@BroCodez4 жыл бұрын
Sweeeeet. Thanks for watching Archer
@archerx91x604 жыл бұрын
@@BroCodez I've watched most of your Java videos I still have a few to go. The 4 hours of gui took me like 8 hours to get through but was very beneficial. Keep doing what your doing bro you have no idea how much you are helping some people achieve their goals.
@tsuai439511 ай бұрын
Same here, this 4 minutes video is more useful than the 1 hr lecture and 3hr tutorial at school
@chakreshsingh3 жыл бұрын
I have never coded in Java and I always wondered what this annotation does .. thanks for clarifying so concisely
@Katie-zk4xs2 жыл бұрын
Your videos are getting me through college better than my textbook! Thank you!
@pavelkvasnicka6856 Жыл бұрын
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
@QueenAyula4 жыл бұрын
Really great explaination, I get overriding a whole lot better now. Thank you.
@BroCodez4 жыл бұрын
thank you for watching Miss H!
@theintrovert8942 жыл бұрын
@@BroCodez can you plzz tell me how to clear screen in java in intelijj
@carsanovadidrifto8002 жыл бұрын
Hey fam, I hope that you and your loved ones are well. I would like to ask you the most important question ever asked: Who is Jesus? Not who is He to you. Rather, who is He really? Jesus is the Son of God, who came to the world as a man. He lived a perfect and sinless life . Even though He was perfect and sinless, on the cross of Calvary God wrathfully punished Him for the sins of the world. 3 days later He rose from death. Now He is seated at the right hand of God, ruling as King over Heaven and Earth. On the judgment day He will judge you, me and every human being that has ever lived. Those who believed in Him will enter eternal joy with Him, but those who did not believe in Jesus will be sent to eternal condemnation. So turn from your sins and believe in the Jesus. Believe and hope that you can be forgiven for all your sins because of His death and resurrection. He took your place in Hell, so that if you submit to Him as your Lord and God, you can be forgiven and take His place in heaven- you will be made sinnless and perfect before the Holy Father. He'll also give you a new heart and mind that can love and obey Him. Jesus lives so that you can have true life and freedom, and most importantly so that you can have an eternally peaceful relationship with God. You are dead, and Jesus is your Hope of love. Acts 15:11 ”On the contrary, we believe it is through the grace of the Lord Jesus that we are saved, just as they are." Ephesians 1:7 ”In Him, we have redemption through His blood, the forgiveness of our trespasses, according to the riches of His grace" Ephesians 2:8 ”For it is by grace you have been saved through faith, and this not from yourselves; it is the gift of God,” John 11:25-26: "Jesus said to her, 'I am the resurrection and the life. The one who believes in me will live, even though they die; and whoever lives by believing in me will never die. Do you believe this?' 1 Corinthians 6:14: "And God raised the Lord and will also raise us up by his power." Romans 6:9: "We know that Christ, being raised from the dead, will never die again; death no longer has dominion over him."
@nikhilsastry66312 жыл бұрын
@@carsanovadidrifto800 🍌🍌🍌
@professionalaveragekid7 ай бұрын
probably one of the most comprehensive java tutorials, without cutting corners :D
@Joseph-gh5ib2 жыл бұрын
I love the videos man. They are straight to the point with no excess bs in-between 🧡
@timothymcbearington9692 Жыл бұрын
Thanks man, Java has been kickin gmy but for a while but your videos are a big help!
@eugenekrabs64002 жыл бұрын
Gotta love when the textbook takes 10x longer to say the same thing in a less intuitive way. Thx bro.
@steatze3 жыл бұрын
One of the best KZbin Chanel
@NextGenTechnologist2 күн бұрын
Thanks for helping me understand my Java homework!
@PektraMom Жыл бұрын
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!!!
@furydjin67697 ай бұрын
Brooo you are goated at explaining JAVA . You make this simpler to understand
@sebitboth46727 ай бұрын
Thank you for making this concept easier and more understandable for me
@allenxu59702 жыл бұрын
hey bro, this is very clear, love your content! keep going!
@davidasiamah2898 Жыл бұрын
Great explanation and example
@bogdan144272 жыл бұрын
Good explanation... easy to understand
@georgmeinecke53703 ай бұрын
very good explanation. 👍
@sandydsi12 жыл бұрын
Explained Effortlessly
@zanzun1146 Жыл бұрын
Great explanation Thank u
@miteshbarnwal82393 жыл бұрын
The best explanation for method overriding.
@safakakin Жыл бұрын
Hi Bro Code, thank you very much for taking the time to provide useful information.
@imsabbar4 жыл бұрын
Thanks a lot ❤️, well Explained bro
@jacobrobin914811 ай бұрын
10/10 video
@HpLapTop-f1x Жыл бұрын
Awe Bro ! Your videos EZ for undestanding and fast !
@hawremuhammed1310 Жыл бұрын
Great Explanation.
@mulidubicus14732 жыл бұрын
Bro i love u, this was short and simple, u explained everything so well wow thank u so much
@soronity2 жыл бұрын
Best explanation I found on this topic!
@yvnnhong Жыл бұрын
best video i've found on this topic!!
@bozkurtburhan63 жыл бұрын
I was suffering for understanding this overriding, but with your help, it seems coming to the end.
@eren-qu9wm Жыл бұрын
Thanks 👍😊 bro you are a living legend
@MY-bn4px4 жыл бұрын
so good
@Tarnovgrad Жыл бұрын
Very good video!Thank you!
@onyxtechnologyx Жыл бұрын
God Bless u finally i understood @override usage
@michellekelly1220 Жыл бұрын
Brilliant, so clearly and well explained - Thank you :)
@munirahalfawzan9 ай бұрын
you r bessssttttt
@ShathaAl-Otaibi2 ай бұрын
شرحه يجننن بكرا عندي فاينل oop وان شاء الله اجيب الفل مارك
@sumeiyajuma3752 жыл бұрын
wonderful explanation
@danny.30363 жыл бұрын
Thanks, Bro! ☕ You're awesome!
@nzubehenry4452 жыл бұрын
Thank you. Now i have a better understanding on this
@pedrofonseca17482 жыл бұрын
Thanks from Brazil!
@WildNature1702 жыл бұрын
clearly understood thanks
@abhishekdas25124 жыл бұрын
You are awesome bro ❤️👍
@BroCodez4 жыл бұрын
thanks for watching Abhishek!
@IceBeam933 жыл бұрын
Thank you so much bro, I finally understood this topic now!
@MissCurlyFriez2 жыл бұрын
holy crap, that was short and sweet.
@unalysuf2 жыл бұрын
Thank you so much for your effort bro
@stepbystepcoding41133 жыл бұрын
nice dude, DONT STOP MAKING TUTORIALS
@danielmilewski76592 жыл бұрын
Very helpful. Thanks!
@Alexlewis222 Жыл бұрын
super helpful
@mohammadfaisalmalik95013 жыл бұрын
Your tutorials are super helpful
@pprsstvz Жыл бұрын
Liked, subscribed and well..commented hehe
@developerjunior4463 жыл бұрын
Thanks you a lot
@pa-3053 жыл бұрын
Best Broooo
@hsn10022 жыл бұрын
You explain so well. Thank you so much)
@KiprutoR2 жыл бұрын
I've struggled with this annotation for a while, been getting wrong explanations of it. I had to comment Thank you.
@Nalanarud2 жыл бұрын
Thanks man! very clear
@DavidPerez-px5bb10 ай бұрын
THANKS SO MUCH MAN!!
@dianamilenaarchilacordoba46325 ай бұрын
great video!!! I'm infinitely grateful for your dedication and big heart to share this knowledge with the world. Thank you soo much
@torki71892 жыл бұрын
We love you Bro. 👍
@eydersandino60882 жыл бұрын
sweet explanation!
@praveenbalajikalla-ng6mx10 ай бұрын
niceeeee bro
@quanyufeng5793 жыл бұрын
learn a lot
@ahmetakpnar77002 жыл бұрын
it really helped. thx bro!
@MCNOSOK8 ай бұрын
good bro
@beplt_2 жыл бұрын
It helped a lot, really lots T^T thank you..
@minhtetpaing16953 жыл бұрын
Thank you so much sir.
@huuloc87193 жыл бұрын
Nice.
@Easy.educantion2 ай бұрын
Thanks you sir
@pablosanchezalvarez85868 ай бұрын
comentario por que me lo pediste y me fue util el video (fui obligado)
@charanko37602 жыл бұрын
Love you bro
@arshiaSESH592 жыл бұрын
Thanks alot Bro
@YuvrajSingh-tc7hbАй бұрын
soo eassyyy
@jazimjazz69284 жыл бұрын
❤️❤️❤️❤️❤️
@pericn2 жыл бұрын
great video man
@rexdanielndi78072 жыл бұрын
great
@kemann38153 жыл бұрын
Awsome
@deepin2urheart5 ай бұрын
sir video on abstract class and interface thanks
@曾毓哲-b1t Жыл бұрын
Thank you very much
@davidgonzalez-ge7ol3 жыл бұрын
Thank you!
@chinchi11203 жыл бұрын
you are great! thank you
@Easy.educantion2 ай бұрын
Sir i wanted to ask, after understanding the basics in java, which framework should i learn in other to become a mobile app developer.
@tharuna609 Жыл бұрын
thanks man you're awesome
@TheEvertonDias2 жыл бұрын
Thanks, Bro!
@balancemyself Жыл бұрын
yup helped me
@monamoradi5741 Жыл бұрын
amazing bro!
@fatjawns36716 ай бұрын
How are you able to use dog and animal method/classes in main even though what you coded isn't in main?