Why Java is not pure Object Oriented Language?

 Everyone says that java is a pure object oriented programming language. It covers all OOPs concepts but that is not really true. I'll prove it why.

So, there are three points which is contradicting the fact that java is not pure object oriented language.

firstly , Java doesn't support multiple inheritance.

As, we know that there is no concept of multiple inheritance in java because a class can only extends one class. In other words, a class can only have a single parent . This is violating the OOPs which supports multiple inheritance.

Secondly, Java has primitve data types.

Java has int, long , bit, short etc data types but in OOPs we can't have primitive data types. This proves that java is not purely Object oriented programming language.


Third, Java main method run without the use of its class object.

As we can see , we never have to call the main method using dot operator which we generally do on calling any method like- a.sum();

so ,by these three points , we can say java is not purely object oriented.

But still we can say java is an object oriented language because to cover up these three drawbacks of java , there are provided three solutions-

First- As java don't support multiple inheritance , it introduced the concept of interfaces. Interfaces can be implemented as much as we want on a single class and we just have to define the method in that class which is declared in an interface .

Second- Java introduced the wrapper classes like Integer , Float etc to vanish the concept of primitive data types . So , we can use Integer , Float instead of int , float etc. We can communicate by their objects without calling their methods.

Third- If we noticed anytime , main method uses static keyword . So , java made this static keyword so powerful that we declared any variable or method by using static keyword then we don't need to call it using dot operator or class name or object. The method will call by itself before any operation if it is static and same with the variable . The static variable will first occupy memory before any other simple variable.

So, yet not pure Object oriented , still Java provides the functionalities of OOPs in itself and hence , finds fascinating by developers and uses world widely.

Comments