#48 Abstraction & Interface In Java | Abstract Class Vs. Interface | final keyword | Java Tutorials
For Online Live Training Contact me directly on - 9310683500 (Available on What's App Also)
Abstraction in Java
In java abstract is a keyword which can only be used with:
a. Methods
b. Classes
Abstract Method:
If you want a class to contain a particular method but you want the actual implementation of that method to be determined by child classes, you can declare the method in the parent class as an abstract.
1. The abstract keyword is used to declare the method as abstract.
2. You have to place the abstract keyword before the method name in the method declaration. E.g., public void get();
3. An abstract method contains a method signature, but no method body.
4. Instead of curly braces, an abstract method will have a semicolon (;) at the end.
Declaring a method as abstract has two consequences: -
a. The class containing it must be declared as abstract.
b. Any class inheriting the current class must either override the abstract method or declare itself as abstract.
Abstract Class:
A class which contains the abstract keyword in its declaration is known as an abstract class. E.g., abstract class Employee{ }
1. Abstract classes may or may not contain abstract methods, i.e., methods without a body. . E.g., public void get();
2. But, if a class has at least one abstract method, then the class must be declared abstract.
3. If a class is declared abstract, it cannot be instantiated means we can’t create object of that class.
4. To use an abstract class, you have to inherit it from another class, and also you need to define/override all the abstract method of that class in your class.
Stay tuned with me for more upcoming Videos,
don't forget to subscribe my YouTube Channel and share your valuable comments in Comment section down below, i'll be happy t o help you all, your Surya ☺
Connect on Socials:-
Facebook:- https://www.facebook.com/AndroJavaTec...
Twitter:- https://twitter.com/AndroJavaTech4U
Google Plus:- https://plus.google.com/u/0/+AndroJav...
LinkedIn:- https://www.linkedin.com/in/androjava...
#Abstraction #Polymorphism #Interface
java Basic Java Tutorial for beginners
Basic Java Programming for beginners
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «#48 Abstraction & Interface In Java | Abstract Class Vs. Interface | final keyword | Java Tutorials», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.