//********************************************* 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??
@aligmayu5322
3 жыл бұрын
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
@BroCodez
3 жыл бұрын
thanks for watching gleford. Yeah it's considered good practice to add @Override, but I always forget 😂
@carsanovadidrifto800
2 жыл бұрын
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."
@carsanovadidrifto800
2 жыл бұрын
@@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."
@EyBossPusi
4 ай бұрын
you programmer now bro
@archerx91x60
3 жыл бұрын
You are a better instructor than my professor at school.
@BroCodez
3 жыл бұрын
Sweeeeet. Thanks for watching Archer
@archerx91x60
3 жыл бұрын
@@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.
@tsuai4395
5 ай бұрын
Same here, this 4 minutes video is more useful than the 1 hr lecture and 3hr tutorial at school
@nikoskephalas4839
Жыл бұрын
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.
@Katie-zk4xs
Жыл бұрын
Your videos are getting me through college better than my textbook! Thank you!
@chakreshsingh
2 жыл бұрын
I have never coded in Java and I always wondered what this annotation does .. thanks for clarifying so concisely
@furydjin6769
Ай бұрын
Brooo you are goated at explaining JAVA . You make this simpler to understand
@professionalaveragekid
Ай бұрын
probably one of the most comprehensive java tutorials, without cutting corners :D
@QueenAyula
3 жыл бұрын
Really great explaination, I get overriding a whole lot better now. Thank you.
@BroCodez
3 жыл бұрын
thank you for watching Miss H!
@theintrovert894
2 жыл бұрын
@@BroCodez can you plzz tell me how to clear screen in java in intelijj
@carsanovadidrifto800
2 жыл бұрын
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."
@nikhilsastry6631
2 жыл бұрын
@@carsanovadidrifto800 🍌🍌🍌
@sebitboth4672
Ай бұрын
Thank you for making this concept easier and more understandable for me
@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
@eugenekrabs6400
2 жыл бұрын
Gotta love when the textbook takes 10x longer to say the same thing in a less intuitive way. Thx bro.
@jacobrobin9148
5 ай бұрын
10/10 video
@Joseph-gh5ib
2 жыл бұрын
I love the videos man. They are straight to the point with no excess bs in-between 🧡
@stefanoatzeni9179
3 жыл бұрын
One of the best KZitem Chanel
@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!!!
@sandydsi1
Жыл бұрын
Explained Effortlessly
@timothymcbearington9692
6 ай бұрын
Thanks man, Java has been kickin gmy but for a while but your videos are a big help!
@imsabbar
3 жыл бұрын
Thanks a lot ❤️, well Explained bro
@yvonnehong7285
9 ай бұрын
best video i've found on this topic!!
@Tarnovgrad
7 ай бұрын
Very good video!Thank you!
@eren-qu9wm
Жыл бұрын
Thanks 👍😊 bro you are a living legend
@bozkurtburhan6
2 жыл бұрын
I was suffering for understanding this overriding, but with your help, it seems coming to the end.
@pedrofonseca1748
Жыл бұрын
Thanks from Brazil!
@Alexlewis222
Жыл бұрын
super helpful
@pprsstvz
Жыл бұрын
Liked, subscribed and well..commented hehe
@miteshbarnwal8239
2 жыл бұрын
The best explanation for method overriding.
@mulidubicus1473
Жыл бұрын
Bro i love u, this was short and simple, u explained everything so well wow thank u so much
@allenxu5970
Жыл бұрын
hey bro, this is very clear, love your content! keep going!
@user-cs5oj6vw7z
10 ай бұрын
Awe Bro ! Your videos EZ for undestanding and fast !
@kemann3815
2 жыл бұрын
Awsome
@KiprutoR
2 жыл бұрын
I've struggled with this annotation for a while, been getting wrong explanations of it. I had to comment Thank you.
@IceBeam93
3 жыл бұрын
Thank you so much bro, I finally understood this topic now!
@MY-bn4px
3 жыл бұрын
so good
@rexdanielndi7807
2 жыл бұрын
great
@MCNOSOK
2 ай бұрын
good bro
@safakakin
Жыл бұрын
Hi Bro Code, thank you very much for taking the time to provide useful information.
@developerjunior446
3 жыл бұрын
Thanks you a lot
@praveenbalajikalla-ng6mx
5 ай бұрын
niceeeee bro
@soronity
2 жыл бұрын
Best explanation I found on this topic!
@michellekelly1220
Жыл бұрын
Brilliant, so clearly and well explained - Thank you :)
@huuloc8719
2 жыл бұрын
Nice.
@user-zq6yx7of5f
Жыл бұрын
Thank you very much
@onyxtechnologyx
11 ай бұрын
God Bless u finally i understood @override usage
@abhishekdas2512
3 жыл бұрын
You are awesome bro ❤️👍
@BroCodez
3 жыл бұрын
thanks for watching Abhishek!
@bogdanbortosu4427
Жыл бұрын
Good explanation... easy to understand
@DavidPerez-px5bb
4 ай бұрын
THANKS SO MUCH MAN!!
@danny.3036
3 жыл бұрын
Thanks, Bro! ☕ You're awesome!
@munirahalfawzan
3 ай бұрын
you r bessssttttt
@nzubehenry445
2 жыл бұрын
Thank you. Now i have a better understanding on this
@hsn1002
Жыл бұрын
You explain so well. Thank you so much)
@MissCurlyFriez
Жыл бұрын
holy crap, that was short and sweet.
@PickleRickkk-cy9xb
3 ай бұрын
❤
@charanko3760
Жыл бұрын
Love you bro
@pablosanchezalvarez8586
2 ай бұрын
comentario por que me lo pediste y me fue util el video (fui obligado)
@balancemyself
8 ай бұрын
yup helped me
@firstnamelastname2971
5 ай бұрын
Thank you!
@unalysuf
Жыл бұрын
Thank you so much for your effort bro
@eydersandino6088
Жыл бұрын
sweet explanation!
@zanzun1146
6 ай бұрын
Great explanation Thank u
@davidasiamah2898
Жыл бұрын
Great explanation and example
@rubenreyes4356
3 ай бұрын
Thanks
@andreebraun7649
Жыл бұрын
👍🏻
@Tinycode779
Жыл бұрын
Thanks alot
@stepbystepcoding4113
2 жыл бұрын
nice dude, DONT STOP MAKING TUTORIALS
@JackNonsence
5 ай бұрын
Thank you bro
@danielmilewski7659
Жыл бұрын
Very helpful. Thanks!
@danielakoyleek3757
Жыл бұрын
Thanks bro
@white-ts5np
10 ай бұрын
thanks bro
@hawremuhammed1310
Жыл бұрын
Great Explanation.
@oshadhaedirisinghe1455
6 ай бұрын
Thank you
@mohammadfaisalmalik9501
2 жыл бұрын
Your tutorials are super helpful
@PoorwayTraning
Жыл бұрын
thanks
@torki7189
2 жыл бұрын
We love you Bro. 👍
@jazimjazz6928
3 жыл бұрын
❤️❤️❤️❤️❤️
@Nalanarud
Жыл бұрын
Thanks man! very clear
@tharuna609
10 ай бұрын
thanks man you're awesome
@oussemaelmzergui7055
3 ай бұрын
thank you
@WildNature170
Жыл бұрын
clearly understood thanks
@minhtetpaing1695
3 жыл бұрын
Thank you so much sir.
@pericn
2 жыл бұрын
great video man
@beplt_
2 жыл бұрын
It helped a lot, really lots T^T thank you..
@ahmetakpnar7700
Жыл бұрын
it really helped. thx bro!
@lmao9619
3 ай бұрын
Comment is yayayayaya. You are the best bro\ /*asdsad*/
@TheEvertonDias
Жыл бұрын
Thanks, Bro!
@soumelee5661
Жыл бұрын
that was cool
@manjish4323
10 ай бұрын
thank you bro
@monamoradi5741
9 ай бұрын
amazing bro!
@sumeiyajuma375
2 жыл бұрын
wonderful explanation
@lmao9619
3 ай бұрын
boom boom
@shalajko
3 жыл бұрын
bro speaks . you should listen
@BroCodez
3 жыл бұрын
only if you want to lol
@RybearCodes
5 ай бұрын
yes
@chinchi1120
3 жыл бұрын
you are great! thank you
@pa-305
3 жыл бұрын
Best Broooo
@bruncekpuncek3049
Жыл бұрын
tnx😃
@fatjawns3671
29 күн бұрын
How are you able to use dog and animal method/classes in main even though what you coded isn't in main?
Пікірлер: 189