GeeksforGeeks » Object oriented queries
Is Java a pure object oriented language?
(17 posts)-
Is Java a pure objected oriented language? Can you please give some examples of pure object oriented languages.
-
Java is not a pure object oriented language because it supports Primitive datatype such as int, byte, long... 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:
1. Encapsulation/Data Hiding
2. Inheritance
3. Polymorphism
4. Abstraction
5. All predifined types are objects
6. All operations are performed by sending messages to objects
7. All user defined types are objects. -
I see full data of post 2 is not visible in Internet Explorer 6. This should not be a problem in any other browser and Internet explorer 7
-
hi..........
java supports wrapper class so int , long , etc are the object of the wrapper class ......
so how can you call java is not pure object oriented -
@Neha: Ya, as like you said Java provides wrapper class for int, long, etc... But still int, long, float,etc... are not classes. Integer, Float, Long only classes. Just consider int, long, float,etc...
-
Neha, I agree with u... java is pure object oriented program why ? the reason is according java specification API class :'Class' the premitive data types byte,short ,int,long,boolean,float,double,char are all objects. And the static methods and static variables are comes under class. So these are the part of class.And one more thing is Pure OO means it supports
1.Classes and Objects
2.Abstraction
3.Encapsulation
4.Inheritance
5.Polymorphism
Java does not support multiple inheritance. But it support Inheritance. Multiple inheritance is the small portion of Inheritance, so it is not considered the main feature for OO programming.
Finally, what i say, No doubt Java is pure OO programming language. -
all premitive datatypes are by default treated as Objects becoz of they are belongs to wrapper classes
java supports the multiple interface through the interafaces but not classes but internally java supports multiple inheritance
Java is supports all the opps concepts..
1.classes
2.objects
3.inheritance
4.polymorphism
5.data abstraction
6.encapsulation
7.dynamic binding
8.message passing
these many concepts java followed...........
and this is the proof for java is purely objects oriented programing language. -
explain with example,how java is not pure object oriented programing language.
-
i am not getting your point neha,please explain with example,how java is not pure object oriented programing language.
-
all mixed versions
-
Who defined the types of polymorphism?
-
Gridhar bhaya if data types r considerd as objects
By default, thn y wrapper classes r usd -
i want OO totle no of in java
-
No doubt java is purely Object Oriented language.
-
Java is not pure object oriented as it supports primitive data types.
Primitive data types are always gets created on Stack, not on Heap.
You can make your program pure object oriented by using Autoboxing, but Java compiler supports primitive data types, so Java cannot be Pure object oriented unless it makes everything in terms of objects.
You can read more on Escape Analysis to get importance dynamically allocated objects. -
my friend specify the java is not pure object oriented programming language because it does not support multiple inheritance and it supports primitive data types .
I specify java supports multiple inheritance through the concept of interfaces and i ask if there is no data primitive data types why you can store the values in main memory so finally i conclude that java is pure object oriented programming language. -
My dear Friend....... in case you say java is not pure object oriented because it support primitive data type?
its not true. java include a new feature known as Wrapper class. In case of static- there are no need for object. because static is related to the class.
Reply
You must log in to post.