Java Tutorial For Beginners 25 - Inheritance in Java

preview_player
Показать описание
★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!

java inheritance constructor
java inheritance vs interface
java inheritance static variables
java inheritance static methods
java vererbung
java subclass
java extend class
java class declarationjava inheritance example
java inheritance example program
java polymorphism
java inheritance constructor
java multiple inheritance
java inheritance interview questions
java inheritance pdf
java inheritance definition
Рекомендации по теме
Комментарии
Автор

It's the time of quarantine and I'm watching this video with my last pair of working earphones and this video increased my heart beat for some time. If you know you know.

jatindhawan
Автор

I thought my headphones were broken, so then I went on a 10-minute search to find other headphones, then realized they were broken too. Then I read the comments. Lesson: read the comments first.

lisam
Автор

You should change the batteries in  your smoke alarm.

cmurray
Автор

Get creative with it. Only a few hours in and I feel like I am learning quite a bit. Try getting user input for height and width like this one:


public static void main(String[] args) {

Rectangle rec = new Rectangle();

System.out.println("Area of a Rectangle");
System.out.println("
System.out.println("| |");
System.out.println("| |");
System.out.println("| |");
System.out.println("
System.out.println("Enter height of Rectangle");
Scanner scan = new Scanner(System.in);
double user_input_rec_height = scan.nextDouble();


System.out.println("Enter width of Rectangle");
Scanner scan1 = new Scanner(System.in);
double user_input_rec_width = scan.nextDouble();


rec.height = user_input_rec_height;
rec.width = user_input_rec_width;
System.out.println("The area of the rectangle is " +rec.area());


Triangle tri = new Triangle();
System.out.println("Area of a Triangle");
System.out.println(" <>");
System.out.println(" [][]");
System.out.println(" [] []");
System.out.println(" [] []");
System.out.println(" [] []");
System.out.println(" [] []");
System.out.println(" [][][][][][][]");
System.out.println("Enter height of Triangle");
Scanner scan2 = new Scanner(System.in);
double user_input_tri_height = scan.nextDouble();


System.out.println("Enter width of Triangle");
Scanner scan3 = new Scanner(System.in);
double user_input_tri_width = scan.nextDouble();


tri.height = user_input_tri_height;
tri.width = user_input_tri_width;
System.out.println("The area of the rectangle is " +tri.area());

oliverwaller
Автор

Excellent videos. Kindly look into the audio issues, please. :)

tabishkhan
Автор

love this tutorial. but that smoke alarm is driving me nuts

anishaa
Автор

hey for the past couple of videos theres static in the right side for sound. the only sound coming is from the left. thank you 

xmodcamaro
Автор

Great video. Youre very clear and easy to understand. Please change your smoke detector battery

dotripleg
Автор

There's a small issue in the area() in Rectangle class. You must cast the height*width to (double) before dividing by 2.
Here by chance the result was true. If it were say 50.xx it'll be also 50. Since it's applying "Integer division" & then, returning it as a double.

nadimbaraky
Автор

Bro i can tell you that you explain everything better than my professor :D i love your videos :)

angelhadzhiev
Автор

Thank you so much Sir... For this excellent lecture... I knew nothing before 😊

tessythomas
Автор

I am not the only one who looked for another pair of earphones. LOL.

sophiaman
Автор

can u tell me who is better to deliver good Java classes in online

tejeshkumarreddy
Автор

6:40 .. Polygon class is called Base class and Rectangle class is called derived class

beawarehelp
Автор

Awesome Video man!! thanks a bunch, got me out of a pinch

jbb
Автор

I don't know why but this is only audible in right ear but not left, first I thought it's my earpiece fault, but it's working fine, please correct the audio settings of your video

shrnrockz
Автор

Actually, this is an example of hierarchical inheritance as the super-class is inherited by both sub-classes.

parijatdhar
Автор

For those hearing only with left ear, just half- plugged your headphone and it would be a lot better xD

toa
Автор

bro, you are teaching inheritance using packages ???

Songoku-hgbc
Автор

Have you removed your videos on composition/aggregation? I remember it was there earlier..

shivanandk