1 What are basics of OOPS Concepts?
OOP concepts in Java are the main ideas behind Java's Object-Oriented Programming. They are an abstraction, encapsulation, inheritance, and polymorphism.
There are four main OOP concepts in Java. They are:
- Abstraction: It involves utilizing simple things to represent complexity. In Java, abstraction means simple things like objects, classes, and variables that represent more complex underlying code and data.
- Encapsulation: The practice of keeping fields within a class private, then providing access to them via public methods.
- Polymorphism: This Java OOP notion lets programmers utilize the very term to indicate different items in diverse contexts.
- Inheritance: This is a special characteristic of Object-Oriented Programming in Java. It allows programmers to create distinct groups that share many of the properties of existing groups.