What is Polymorphism?

Polymorphism means many forms. A single object can refer to the super-class or sub-class depending on the reference type which is called polymorphism. Example: Public class Manipulation(){ //Super class public…

What is Encapsulation?

Purpose of Encapsulation: Protects the code from others. Code maintainability. Example: We are declaring ‘a’ as an integer variable and it should not be negative. public class Addition(){int a =…

What is a Class?

All Java codes are defined in a Class. It has variables and methods. Variables are attributes which define the state of a class. Methods are the place where the exact business logic…

What are the features of JAVA?

Features of Java are as follows: OOP concepts Object-oriented Inheritance Encapsulation Polymorphism Abstraction Platform independent: A single program works on different platforms without any modification. High Performance: JIT (Just In Time compiler)…