Abstraction and its types in Java

Abstraction and its types in Java

Abstraction is the process of hiding the implementation details of a class or method and showing only the functionality to the user. Note: Although we cannot create objects for abstract classes, we can extend abstract classes using a non abstract class and create objects for the non abstract class. So…what are the ways to achieve … Read more

Inheritance and its types in Java

Inheritance and its types in Java

Inheritance is a concept of using the methods and attributes of one class(superclass/base class) into another(child class/subclass) with the help of the “extends” keyword. The concept of inheritance allows us to achieve code reusability and method overriding. Let’s see the syntax for Inheritance: Let’s see an example of Inheritance Output: Types of Inheritance Types of … Read more