Java Tutorial for Beginners #17 - Inheritance

preview_player
Показать описание
In this java tutorial I will be going over inheritance. Talking about sub-classes, super-classes, derived classes and so on.

Java beginners programming tutorial. A complete java tutorial meant for absolute beginners. Absolutely no programming experience required. If you are new to programming and want to get started you are in the right place!

**************************************************************

**************************************************************

Please leave a LIKE and SUBSCRIBE for more content!

Tags:
- Tech With Tim
- Java tutorial for beginners
- Tech with tim java
- Java tutorials
- Beginner Java tutorials
- OOP in java
- java inheritance
Рекомендации по теме
Комментарии
Автор

I am following these tutorial series and I love every single one of your videos.
PS: I know that probably it was already mentioned, but Instead of cats inheriting from dogs, it would have been better to start with an Animal class and then inherit from it. It is somewhat confusing the way it is

sotech
Автор

When you say 'package' towards the end of the video, do you basically mean another project in the IDE?

kelvinr
Автор

Not sure what i'm doing wrong, but where you're creating the 2nd and 3rd constructor for cat I'm getting redlines under the super(name, age); and super(name); I cant work out why this is... it is giving me this error The constructor Dog(String, int) is undefined

GhostRanger-zjlg
Автор

In Java can a constructor be given a default value, so that an object can be created without using all the arguments like in Python?
Python example constructor:
class Cat:
def __init__(self, name, age, food=0):

cat = Cat("Tim", 4)

This would work as food has a default of "Zero"

edster
Автор

you did not print age but very good video.

Heathhett
Автор

Dude I love your chanel but we wanna python maybe do u wanna write interesting selenium program on python ?

Uploadnamess
Автор

Cat and Dog should inherit from a more abstract object like Mammal, Pet or Animal. Cat should not inherit from Dog, because cats don't have an "is a" relationship with dogs.

gosnooky