Monday 21 July 2014

Features of Java: Java Pure Object Oriented or not????

Continuing Features of Java....

Object Oriented :                                    Many People argue that java is a pure object oriented language.But this is not true at all.Java is a object oriented language But not purely Object oriented language.
In Java,if you write any function even main() without enclosed in a class ,you cannot run the program.So it follows that it follows class structure. 
Java is not having direct support for multiple inheritance.That means you cannot have more than one parent class for child class. 
Contradiction:
Through interfaces you can have multiple inheritance .Then how one can say it is not a pure OOPs language??
Java supports primitive data types which means you can declare a variable like this.
                                   int $_a=10;
Contradiction
Here you are not creating an object of class integer But still you are accessing value .If this was possible only through wrapper classes we may call this as pure OOPs language.

Integer i1=new Integer(100);
so here you are creating Object for accessing integer value.
Java does not support pointers
Contradiction:
But Java Implicitly uses pointers only .Just like in ResultSet interface ,pointer is internally pointing to 0 th row then through next() method we use pointer too fetch the data.

Question:  So java is purely Object Oriented or Not????




                                      

No comments:

Post a Comment