Why JAVA is NOT an 100% object oriented programming language?:confused:
Printable View
Why JAVA is NOT an 100% object oriented programming language?:confused:
its is 100% object oriented programming no doubt abt it.....
Many languages claim to be object-oriented. While the exact definition of the term is highly variable depending upon who you ask, there are several qualities that most will agree an object-oriented language should have:
1.encapsulation/information hiding
2.inheritance
3.polymorphism/dynamic binding
4.all pre-defined types are objects
5. all operations performed by sending messages to objects
6.all user-defined types are objects
A language is considered to be a "pure" object-oriented languages if it satisfies all of these qualities. A "hybrid" language may support some of these qualities, but not all. In particular, many languages support the first three qualities, but not the final three.
Eiffel, smalltalk, and ruby are all pure object-oriented languages, supporting all six qualities listed above. Java claims to be a pure object-oriented language, but by its inclusion of "basic" types that are not objects, it fails to meet our fourth quality. It fails also to meet quality five by implementing basic arithmetic as built-in operators, rather than messages to objects.
So,java is not 100% object oriented language,according to me.
----------------
Neelima
Java is not a pure object oriented language, coz u can still access static variables using class name instead of any reference to any objects
Is there any programming language that is 100% OO?What is the advantage if primitives derive from object?
Java is 100% OOP. if any doubt refer books
none can justify whether its a 100%oo or not
Java is not purely object oriented because, to be a pure object oriented language:
- the only way to access any data must be through the objects.
- Every data must be available in form of objects
In Java, you can have static variables, primitive data types etc. which evidently don't fulfill above conditions.
Regards,
Anand
j2eeconcepts dot com
Hi friends,
Java is 200% purely object oriented , bcoz .....
" Without a class we cannot create a programme in java"...
I hope it will reflect......
You still have basic types like char and int in Java... so no... It is not 100% OO
Check Eiffel and you will see a true 100% OO language
Hi friend,
JAVA is 100% purly obeject oriented programming language
because of it doesn't work without an object.java works with real time objects.
example an human being is an object.
car is also an object of type vehicle.
Hi friends
I guess that It's all about semantics
But you can in theory make a java program without creating objects, It is true that you have to declare a class to use public static void main() in, but main is static and that means that is inserted directly to a fixed memory address, and since the class is never instantiased, it never gets to be an Object.
This way you can have a fully implemented program just by using int, char, etc. without ever using Object capability, so you might say that Java is Object Oriented, but from my point of view, 100% is too much for Java.
In the case of Eiffel there isn't a single primary type, every single one of Eiffel types are Classes and there's no way you can work a program out without creating an instance of a class and there for creating an Object...
This is my point of view, and as valid as any-one's who cares to make their point.
For my interpretation of these theories, a Class is a Class and an Object only exists after creating a memory instance of a Class, before that is no more then code.
If you'd still like to call Java 100% OO, then I guess that Eiffel would have to be 110% OO or, Strictly Object Oriented.
So in the end... it's all semantics
Hope I haven't offended anyone, as it was not my intention, but I think it's Important not to place Java and Eiffel at the same level
Java uses [B]primitive data types[/B] and [B]static variables and static methods[/B] hence is not a pure object oriented language. :)
Object oriented paradigm says, everything is an object.
But the presence of primitive datatypes makes Java , non object oriented language.
Still , JAVA is made object oriented language these days with WRAPPER classes.
Instead of
int i=0;
Integer i = new Integer(0);
makes it OOP language.
(From jdk1.5 ver. autoboxing feature supports thius feature.)
JAVA is 100$ object oriented language.