Why java is not a pure object oriented language ?

What are the qualities of the object oriented language ?

  1. Encapsulation

  2. Abstraction

  3. Inheritance

  4. Polymorphism

  5. All predefined types are objects

  6. All user defined types are objects

  7. All operations performed on the objects must be only through methods exposed at the objects.

Why java is not a pure object oriented language ?

Primitive Data Types

  1. For a pure object oriented programming language , data should be represented in the form of objects only.

    1. But java supports 8 primitive data types such as byte , short,int,long,float ,double. -> and because of this java is not considered

    2. Size of primitive data types in java is fixed and is platform independent

    3. Pure object oriented programming language.

  1. Static Keyword :

    1. Creating variables and methods with static keyword can be accessed with just class name that is breaking the law of OOPS As the law states that we should access anything using an object in OOPS
  2. Wrapper Classes

    1. Even though java has wrapper classes we cannot say it is Pure OOPs since internally wrapper classes uses

    2. Autoboxing and autounboxing that uses primitive types