what is abstraction || abstract method in java ||

Publicado em: 24 Fevereiro 2024
no canal de: LearningPointAabid
45
7

Abstraction in Java is a fundamental concept in object-oriented programming (OOP) that enables you to model real-world entities as classes and objects while hiding their complex implementation details.
A class which is declared with the abstract keyword is known as an abstract class in Java. It can have abstract and non-abstract methods (method with the body).
Abstraction is a process of hiding the implementation details and showing only functionality to the user.
Example:- it shows only essential things to the user and hides the internal details, for example, sending SMS where you type the text and send the message. You don't know the internal processing about the message delivery.

Rules for java Abstract class
An abstract class must be declared with an abstract keyword.
It can have abstract and non-abstract methods.
It cannot be instantiated.
It can have constructors and static methods also.
It can have final methods which will force the subclass not to change the body of the method.

A method which is declared as abstract and does not have implementation is known as an abstract method
Example: abstract void run();
Bike is an abstract class that contains only one abstract method run. Its implementation is provided by the Honda class


Nesta página do site você pode assistir ao vídeo on-line what is abstraction || abstract method in java || duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário LearningPointAabid 24 Fevereiro 2024, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 45 vezes e gostou 7 espectadores. Boa visualização!