CP1344: PROGRAMMING IN JAVA - LECTURE -37- INHERITANCE: EXTENDING A CLASS- BCA- S3.
Inheritance: Extending a Class
Reusability is yet another aspect of OOP paradigm. It is always nice if we could reuse something that made exists rather than creating the same all over again. Java supports this concept. Java classes can be reused in several ways. This is basically done by creating new classes, reusing the properties of existing ones.
The mechanism of deriving a new class from an old one is called inheritance. The old class is known as the base class or super class or parent class and the new one is called the subclass or derived class or child class.
The inheritance allows subclasses to inherit all the variables and methods of their parent classes.
Inheritance may take different forms:
Single inheritance (only one super class)
Multiple inheritance (several super classes)
Hierarchical inheritance (one super class, many subclasses)
Multilevel inheritance (Derived from a derived class)
Java does not directly implement multiple inheritance. However, this concept is implemented using a secondary inheritance path in the form of interfaces.
Defining a Subclass
A subclass is defined as follows:
class subclassname extends superclassname
{
variables declaration;
methods declaration;
}
The keyword extends signifies that the properties of the superclass name are extended Subclass name. The subclass will now contain its own variables and methods as well those of the superclass. This kind of situation occurs when we want to add some more properties to an existing class without actually modifying it.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «CP1344: PROGRAMMING IN JAVA - LECTURE -37- INHERITANCE: EXTENDING A CLASS- BCA- S3.», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.