Today we will discuss Why Java Is Called As Object Oriented Programming? As Java deals with Classes and their Objects and has a number of concepts like Polymorphism, Abstraction, Inheritance, and Encapsulation which are called OPPs concepts.
Object Oriented Programming
There are a number of advantages of Object-oriented programming which are not there in procedural programming like C:
- OOPs is a faster and easy language
- It gives a clear structure to the program
- It helps the language to keep the code DRY which means it prevents us from rewriting a set of code in many ways.
And many more advantages are there for oops wand java follows all the cases which are needed for an oops language
Now let’s understand a little about its concepts.
Here we design the objects and functions such that we can use them more than one way like overriding overloading where the one name of the function can be used in different ways.
As the literal meaning suggests getting the properties of parents into a child something like this is happening in the case of Inheritance also where the child class inherits all the Properties of the parent class and the property of itself.
That is child class can access most of the members which include functions, Variables, and objects of the parent class.
It is a property of OOPs where we can hide unnecessary information from the user or we can say we can hide the data which is not relevant to the user to make the use smooth and easy.
Take an example where there are a lot of information regarding a particular program that might be useful but too much information might lead to overlooking the more important information so we can hide that unnecessary information.
Encapsulation means keeping the information related to a particular thing in the same set or we can say binding the information of one type in a single place we make the information readable.
Classes And Objects
Classes in OOPs are the templates of objects. And objects are called instances of the class.
Learn More about What is Object Oriented Programming And How Is It Better then Procedural Programming? : OOPs Vs Structural Language
And Also visit at JAVA TUTORIALto learn more about java and solve your problems.