Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

Why Java is not pure object oriented?

user-image
Question ajoutée par Rekha Ingulkar , BMC Software India Pvt. Ltd
Date de publication: 2013/12/27
Mohd shahnawaz khan
par 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
par 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
par 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
par 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

 

Utilisateur supprimé
par Utilisateur supprimé

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

Utilisateur supprimé
par Utilisateur supprimé

because it dosent support multiple inheritance .

 

but it is done by interfaces some what

 

Hatim Laxmidhar
par 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..

(Le lien a été supprimé pour non-respect des conditions d'utilisation. Veuillez contacter l’équipe d'assistance pour plus d'informations.)

More Questions Like This