Is java pure object oriented language explain?| example of pure oop language
We all learn that java supports Object Oriented Programming (OOP) features.
But then all of a sudden in interviews, interviewer fires a question -
-
"is java pure object oriented language explain", or
-
"Is java 100 oop programing?"
-
example of pure oop language
And this may put you in confused state if you have not thought about it earlier whether is java pure oop language?
So to avoid any confusion at that time lets prepare for such questions beforehand.
is java pure object oriented language or not
Most of us are aware that java supports object oriented programming. But if we dive deeper into oop rule books, we will find that java is not a pure OOP language. As it supports primitive data types as well like int, double, float, long, etc. which is in contrast to the OOP that deals particularly in objects only.
Example of pure oop language
Here is a video tutorial that explains is java pure oop language?
To answer is java pure oop language, lets see below pointers
A pure OOP must satisfy all of these:
-
Polymorphism,
-
Encapsulation,
-
Inheritance,
-
Abstraction,
-
every user-defined type must be object,
-
all operations performed on the objects must take place through methods exposed as object.
Which oop rule does java violates?
Java violates the last two rules (marked in red) of OOP.
-
In java, pre-defined types such as primitive types are non-objects.
-
Apart from this a class declared as static does not require to be instantiated at all for calling it.
Thus we can conclude java is not pure oop.
So if you are asked now is java pure object oriented language or not or is java pure object oriented language explain.
I hope now you can give proper explanation to support your answer.
Would you like to see your article here on tutorialsinhand.
Join
Write4Us program by tutorialsinhand.com
About the Author
Sonu Pandit
I am editor in chief at tutorialsinhand.com responsible for managing, reviewing and sending articles/contents for final approval to get published. Connect with me@https://www.linkedin.com/in/sonu-pandit-a77b471ab/. Join write4us program & share your skill
Page Views :
Published Date :
Jun 29,2022