Java super keyword 🦸‍♂️

preview_player
Показать описание
Java super keyword tutorial explained

#Java #super #keyword
Рекомендации по теме
Комментарии
Автор


public class Main {

public static void main(String[] args) {

// super = keyword refers to the superclass (parent) of an object
// very similar to the "this" keyword

Hero hero1 = new Hero("Batman", 42, "$$$");
Hero hero2 = new Hero("Superman", 43, "everything");



}
}

public class Person {


String name;
int age;

Person(String name, int age){
this.name = name;
this.age = age;
}

public String toString() {
return this.name + "\n" + this.age + "\n";
}


public class Hero extends Person{


String power;

Hero(String name, int age, String power){
super(name, age);
this.power = power;
}

public String toString() {
return super.toString()+this.power;
}

BroCodez
Автор

More power to you man.
I watched a lot of tutorials but yours really exceeded everyone.
The way you explain is so easy to understand!

reynaldojrcapilitan
Автор

I just love how you repeat previous topics by explaining the code in a certain order. Thx bro, greetings from Turkey

EmirKaanOgsarim
Автор

I'm surprised that this channel only has 2.53k subs, it's "super" underrated

furiouspuzza
Автор

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
Автор

This is the best YouTube Channel for teaching how to Code on YouTube !
Keep going and you will surely reach the 1 Million soon !
Thank you for the great way in explaining !

husein_alfil
Автор

One of the best youtube channel helps me a lot in learning coding.

adish
Автор

thank you
after 4 hour long lesson in school, you made it clearer in 3 videos of -10 min
thank you

younesbarais
Автор

Your video is short, but it's informative. That's all we need. Many thanks

thang.d
Автор

The best channel to learn and get started with a new programming language . Thanks bro

bhavesh
Автор

You show very good examples and explain it very well!

Tarnovgrad
Автор

Awesome video. I'm new to programming and learning JAVA atm. Would surely enroll in one of your courses if you had them because all the subjects i struggle with in my textbook are always clear to me after one of your video's!

jeffdoo
Автор

Hey Bro, I just shared your channel on r/learnprogramming, hopefully it'll help you in your heroic defiance of the almighty algorithm :)

derjenicheoffiziell
Автор

superb vid. very powerful presentation

shalajko
Автор

Best java course I've found, by far

MusicMan
Автор

this actually deserves more likes unfortunately people dont do this often :(

shubhsharma
Автор

Because of you good sir! I was having fun with my programming exam

manchester
Автор

these 10 min thought me more than the 2 hour lecture in university lol thx bro

lanak.
Автор

you are really a java server i have understood more than i ever imagined

angelamwelwa