Why Java is not pure OOP?

Why Java is not pure OOP

There are opinions flying across the internet, which reveals that Java is not purely Object-Oriented Programming language. Quite a shock right? and you might wonder, why Java is not pure OOP? what kind of factors that prescribe Java not as a 100% pure OOP? in this article we’ll take a look at the answers to these questions.

Before we decide that Java is not a pure OOP we’ll have to consider what makes a programming language categorized as an OOP.

Is Java inside the category of Object-Oriented Programming?

What is OOP

Okay, so the first step to determine whether Java is an OOP or not is we’ll need to know what an OOP is. Of course I have covered this topic before which you can see here what is an OOP, but on this occasion, I’ll talk about it again, why not?

Object-Oriented Programming or OOP is a programming language in which the programs are organized around data or objects. Or in my previous posts, another definition for OOP is Object Oriented Programming is a programming language model that is organized around “objects” rather than logic manipulating. OOP takes the view that what we really care about is the object that manipulates itself rather than the logic required to manipulate them.

OOP Principles

If a programming language applies these principles then it is an OOP:

  1. Encapsulation
  2. Abstraction
  3. Inheritance
  4. Polymorphism
  5. All user-defined types are objects.
  6. All predefined types are objects
  7. Operations are performed by sending messages to objects

Because as we all know that Encapsulation, Abstraction, Inheritance, and Polymorphism are a part of the Java language, so we can safe to say that Yes! Java is an OOP language!

So why Java is not pure OOP?

After we knew that java applies the principles of OOP, we still have a bit of a problem, hmm. Many Java programmers around the internet say that Java fails to apply OOP principle on number 6 and 7. Why so?

Some argue that because Java supports primitive datatype such as int, byte, long, etc. then Java can not be called a pure OOP.

But! many others still insist that Java is pure OOP because it applies almost all aspects/principles of the OOP.

What is the conclusion?

Well, I have to break it all to you that, In the end, it doesn’t really matter. Whether Java fits the category of OOP or not, it would not change what programmers can create with Java at all. Java is still the multi-platform, write once run everywhere type of programming language Java developers all love.

So the best thing to do is to end the debate and focus to shape the future of Java.

references: Geek to Geek

Leave a Reply

Your email address will not be published. Required fields are marked *