أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
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
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.
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.
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
Its not Because it has data types(primitive data types) that are not objects
because it dosent support multiple inheritance .
but it is done by interfaces some what
There is a very good discussion done in linked in.
Please have a look at this thread..
(لقد تم حذف الرابط بسبب انتهاكه لسياسة الموقع. يرجى التواصل مع قسم الدعم لمزيد من المعلومات.)