My Blog

My WordPress Blog

My Blog

My WordPress Blog

6. Java Abstraction

Difference between abstract class and interface

Abstract class and interface both are used to achieve abstraction where we can declare the abstract methods. Abstract class and interface both can’t be instantiated. But there are many differences between abstract class and interface that are given below. Abstract class Interface 1) Abstract class can have abstract and non-abstract methods. Interface can have only abstract methods. Since Java […]

Abstract class in Java

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). Before learning the Java abstract class, let’s understand the abstraction in Java first. Abstraction in Java Abstraction is a process of hiding the implementation details and showing only functionality […]

Scroll to top