Why Java is not a pure Object-Oriented Language?
Overview
Java is an OOP language, but it’s not a pure object-oriented language.
There are some qualities to be satisfied for a programming language to be pure Object Oriented.
Everything should be an object. For example, all types defined in the programming language should be treated as objects.
Java treats primitives as non-objects
Java is not a pure object-oriented programming language because it supports primitive data types such as byte, char, int, long… etc, which are not objects. In the Java programming language, we treat primitive data types as non-objects.
To overcome this, Java introduced Wrapper classes like Character, Integer, Float, Double, etc. These are wrapper classes for the corresponding primitive types. Using wrapper classes we can treat the primitives as objects.
Example of Pure objected-oriented
An example of a pure object-oriented programming language is Smalltalk. In Smalltalk, there are no primitive types and all types are treated as objects.
Squeak the modern implementation of Smalltalk is another example of pure OO language.