Java inheritance 👪

preview_player
Показать описание
Java inheritance tutorial example|

#Java #inheritance #tutorial #example
Рекомендации по теме
Комментарии
Автор


public class Main {

public static void main(String[] args) {

// inheritance = the process where one class acquires,
attributes and methods of another.

Car car = new Car();

car.go();

Bicycle bike = new Bicycle();

car.go();
bike.stop();




}
}

public class Vehicle{
double speed;

void go(){
System.out.println("This vehicle is moving");
}
void stop(){
System.out.println("This vehicle is stopped");
}
}

public class Car extends Vehicle{
int wheels = 4;
int door = 4;
}

public class Bicycle extends Vehicle{
int wheels = 2;
int pedals = 2;
}

BroCodez
Автор

Bro inherited awesome teaching skills from parent class.

shyam.upadhyay
Автор

You are hands down the best code teacher on YouTube.

uxkjtcp
Автор

Clear and straight to the point. Thank you <3

hanac
Автор

Thank you Bro. No confusion, straight to the point, no BS

satvikraval
Автор

you have no idea how better this video made me feel thank you so much college been really overwhelming so far

cosecE
Автор

Prayers answered! Most straight forward explanation I’ve seen!

bernardcyrus
Автор

Your 6-minute video made the bootcamp LMS content much easier to understand. Much appreciated!

seabrin
Автор

I spent much time to understand this program but once watching your video made it very simple for me. Thank you so much for this video.

BinsiAgone
Автор

You made this super simple to understand. Thank you.

bk-entertainz
Автор

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

You made it extremely easy to understand. Thank you man

mustafaalsais
Автор

Tysm for these videos! I love learning how to code but had to drop my Java class to make room for a period of basketball. Now I can do both :)

liliacfury
Автор

thanks for the video! easy to understand and straight to point

codemagic
Автор

Bro just out here saving lives and time. Thanks Bro

ivosesugh
Автор

thank you for enlighten me.. its very useful in my study

joemariebisonaya
Автор

Good video. Thanks for the applied example

jaywest
Автор

thanks for making it so easy to understand, awesome video, no more neither less information of what i needed

jazielgarcia
Автор

Nice tutorials.. keep on
Bring all kinds of java sessions as animated 5 to 10 min clips
or a 20 - 40 min big sessions

but fundamental and example

abdulrenishr
Автор

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

professionalaveragekid