An abstraction is a way of hiding the implementation details and showing only the functionality to the users. In other words, it ignores the irrelevant details and shows only the required one.
Points to remember
Let's check whether we can create an instance of Abstract class or not.
Let's see an example to achieve abstraction.Test it Now
Vehicle is: Honda
In this example, we use instanceof operator to test whether the object refers to the corresponding class.Test it Now