wood burning stoves*
The moose likes Java in General and the fly likes Java and OOPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java and OOPs" Watch "Java and OOPs" New topic
Author

Java and OOPs

Vallabhaneni Suresh Kumar
Ranch Hand

Joined: Mar 01, 2004
Posts: 68
Why Java is not fully object oriented language?
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140

[ July 26, 2005: Message edited by: Mani Ram ]

Mani
Quaerendo Invenietis
Qi Liang
Greenhorn

Joined: Jun 04, 2003
Posts: 28
One reason is the primitive types, like int, double and so on.
Vijayendra V Rao
Ranch Hand

Joined: Jul 04, 2004
Posts: 195
Originally posted by Vallabhaneni Suresh Kumar:
Why Java is not fully object oriented language?


Show me a program without a single class in it first and then I will answer your question! What does a class encapsulate?! Think!!!


Vijayendra <br /> <br />"The harder you train in peace, the lesser you bleed in war"
Clarice Doe
Greenhorn

Joined: Dec 24, 2004
Posts: 21
Originally posted by Vijayendra V Rao:
Show me a program without a single class in it first and then I will answer your question!


I can't. It's a syntactic requirement of Java (you can define interfaces & enums, but they don't count as a program, for they can't function independently).

Can you now answer to the question "Why Java is not fully object oriented language?"

Originally posted by Vijayendra V Rao:What does a class encapsulate?! Think!!!


It encapsulates state and behaviour. But, what effect does that has on whether Java is OO or not.
Vijayendra V Rao
Ranch Hand

Joined: Jul 04, 2004
Posts: 195
Originally posted by Clarice Doe:


It encapsulates state and behaviour. But, what effect does that has on whether Java is OO or not.


Good stuff! A class represents the state and behavior of "something". Now what is that "something"? When we design an application, we try to split up the problem domain into a conceptual set of objects and then we write classes that represent the state and behavior of these objects within the application scope. Even to start an application you will need an object, which would be the starting point. Even this is an object from where your application kicks off.

Thats the reason why I put it up in the form of a question itself. There is no way you can write a non-object-oriented program, atleast as far as I know, in Java. Ofcourse you can have an interface or an abstract class. But what is the purpose of it?! Where will you use it?! What does it represent?! It isn't even going to have a context in such a case.

I dunno how far I have been able to express myself. But if you still have questions then shoot back
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
Originally posted by Vijayendra V Rao:

There is no way you can write a non-object-oriented program, atleast as far as I know, in Java.


Disagree. Remember that just using objects doesn't necessarily mean that it is OO.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by Vijayendra V Rao:


There is no way you can write a non-object-oriented program, atleast as far as I know, in Java



Its very easy to break OO principals with Java.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Even in the most OO language, it would still be simple to write a fully procedural program, so that is hardly an argument.

For elaborate discussions on how Java is lacking in OO functionality, please do search this forum - it's a very frequently discussed topic.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java and OOPs
 
Similar Threads
class
WA #2 ..... word association
c++ or Java--your suggestions please
zipping as self extracting exe
J2EE