Give reason- "Java is a pure object oriented programming language."
Answers
Answered by
3
A Pure Object-Oriented Programming Language should be true for all the 7 conditions mentioned below:
1. Inheritance
2. Encapsulation/Data Hiding
3. Polymorphism
4. Abstraction
5. All predefined types are objects
6. All operations are performed by sending messages to objects
7. All user defined types are objects
Java generally satisfies almost all the conditions except condition #5 as Java supports some primitive data types like int, float,long etc. Thus, Java is not a pure Object-Oriented Programming Language.
Whereas if we consider Smalltalk which is a pure Object-Oriented Programming Language, as it does not support any primitive datatypes. All the pre-defined types are objects.
This quote rightly explains that, though Java is not a pure Object-Oriented Programming Language, it still is more popular and powerful than almost all the rest pure Object-Oriented Programming language.
1. Inheritance
2. Encapsulation/Data Hiding
3. Polymorphism
4. Abstraction
5. All predefined types are objects
6. All operations are performed by sending messages to objects
7. All user defined types are objects
Java generally satisfies almost all the conditions except condition #5 as Java supports some primitive data types like int, float,long etc. Thus, Java is not a pure Object-Oriented Programming Language.
Whereas if we consider Smalltalk which is a pure Object-Oriented Programming Language, as it does not support any primitive datatypes. All the pre-defined types are objects.
This quote rightly explains that, though Java is not a pure Object-Oriented Programming Language, it still is more popular and powerful than almost all the rest pure Object-Oriented Programming language.
Answered by
2
Java is not because it supports Primitive datatype such as int, byte, long... etc, to be used, which are not objects.
Similar questions