Is java Purely Object Oriented?

java

Solution

It's called autoboxing. Basically, the Java compiler converts primitive data types into objects for you when you use them in a context that requires them to be objects.

Problem

We are saying that java is not purely object oriented since primitive data types are not objects.But in below code how object is holding primitive data type? ``` public class Test{ public Object meth(Object obj){ System.out.println(obj instanceof Object);//It prints true System.out.println("Value = "+obj);//It prints "Value = 1" return obj; } public static void main(String[] args) { int a = 1; System.out.println(new Test().meth(a)); } } ```

Original source