Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Why Java is not pure object oriented?

user-image
Question added by Rekha Ingulkar , BMC Software India Pvt. Ltd
Date Posted: 2013/12/27
Mohd shahnawaz khan
by Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution

 Everything in Java is not considered as a Object, there are primitive data types available.Ex : for no.s we are using the int which is not a object type. (only Integer is object type ). 2) All features of OOP language is not fully supported by Java.Ex : Multiple Inheritance, Operator Overloading, etc. For a pure object oriented language,there should be6 features available with it.They are:-1.Encapsulation/Information Hiding2.Inheritance3.Polymorphisms/Dynamic Binding4.All pre-defined types should be Objects5.All operations performed by sending messages to Objects6.All user-defined types are ObjectsBut in java,features4 &5 are lacking.That'swhy it is not100%pure OO

Mukesh Kumar
by Mukesh Kumar , Software Engineer , Team Computers Pvt. ltd

Java is not a pure object oriented language because it supports Primitive datatype such as  int, long, char, double… etc, to be used, which are not objects.

 

There are seven qualities to be satisfied for a programming language to be pure Object Oriented. They are:

Encapsulation 

Inheritance

polymorphisum 

Abstraction 

All predefined data type are object

All operation are performed by sendind message to object

All user defined type are object.

Deepak Kumar Shrivastava Dipu
by Deepak Kumar Shrivastava Dipu , System Engineer , ibm

For a pure object oriented language, there should be6 features available with it. They are:-

1.Encapsulation/Information Hiding 

2.Inheritance 

3.Polymorphisms/Dynamic Binding 

4.All pre-defined types should be Objects 

5.All operations performed by sending messages to Objects 

6.All user-defined types are Objects 

But in java,

features4 &5 are lacking.That’s why it is not100%pure OO..

Because it contains eight primitive data types,these data types cannot be used as objects.

Smalltalk is pure OOP's.

 

Faizan Ahmad
by Faizan Ahmad , Quality Analyst , US Tech Solutions Noida

1) Everything in Java is not considered as a Object, there are primitive data types available. Ex : for no.s we are using the int which is not a object type. (only Integer is object type ).  2) All features of OOP language is not fully supported by Java. Ex : Multiple Inheritance, Operator Overloading, etc.

primitive data type is used in java .so java is not pure object oriented 

A language to be a pure oops it should stick to the object whereeas in Java you can do something without using object .

e.g.

You want to print something ,System .out.println("Hello World") -Here you don't need to create any object directly you are using class ,you are using java  .

Hence Java in not pure oops

 

Deleted user
by Deleted user

Its not Because it has data types(primitive data types) that are not objects

Deleted user
by Deleted user

because it dosent support multiple inheritance .

 

but it is done by interfaces some what

 

Hatim Laxmidhar
by Hatim Laxmidhar , Self Employed , The Way It Works

There is a very good discussion done in linked in.

Please have a look at this thread..

(URL removed due to policy violation. Please contact support for further information.)

More Questions Like This