Java OOP

Difference between Abstract Class and Interface in Java

Abstract class and interface both are used to achieve abstraction in java. Still there are lot of differences between abstract class and interface which I am sharing in this tutorial. Difference between Abstract Class and Interface in Java Difference between Abstract Class and Interface in Java – Image Source Abstract Class Interface Abstract class can …

Difference between Abstract Class and Interface in Java Read More »

Interface in Java

Before learning interface in java, you must know about abstraction. So lets learn about what is abstraction. Abstraction in Java Abstraction is the process of hiding the complexity and showing the functionality. Showing the essential data and hiding the non essential data.  We can understand this by taking a real world example. We have fan …

Interface in Java Read More »

Abstract Class in Java

Before reading this tutorial I will recommend you to read about dynamic binding in java, because without knowing about dynamic binding you can’t understand the concept of abstract class in java.   Abstraction in Java Abstraction is the process of hiding the complexity and showing the functionality. Showing the essential data and hiding the non …

Abstract Class in Java Read More »

Super Keyword in Java

Super refer to parent class. It holds the reference id of parent section of child class object. Observe below example. class A {                 int x=10; } class B extends A {                 int x=20; } Here you can see that in child object, two separate sections are created namely parent section and child section. …

Super Keyword in Java Read More »

Inheritance in Java

Creating a new class from existing class is known as inheritance. Inheritance is used to achieve dynamic binding and reusability. The class which is inherited is known as super class or parent class and the class derived from the parent class is known as sub class or child class. Inheritance is implemented using extends keyword. …

Inheritance in Java Read More »