OOPs Concepts in Java
There are 4 OOPs concepts in java: Inheritance Encapsulation Abstraction Polymorphism Inheritance: This is a special feature of Object Oriented Programming in Java.Inheritance called when child class acquires all properties and behaviors of parent class or superclass. Class Super{ ..... ..... } Class Base extends Super{ ..... ..... } Encapsulation: Encapsulation in Java is a mechanism for wrapping the data (variables) and code act on the data(methods) together as a single unit. For ex. capsule The Java Bean class is the example of fully encapsulated class. An advantage of Encapsulation in java: By providing Getter and Setter methods we can make that class ad read-on