wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Java pure Object Oriented ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java pure Object Oriented ?" Watch "Java pure Object Oriented ?" New topic
Author

Java pure Object Oriented ?

Deepak Mahbubani
Ranch Hand

Joined: May 12, 2001
Posts: 68
As per Core Java, Java is a pure Object Oriented Language.
However, some claim that since java has native types like int, float which are not objects, Java is NOT a purely OO language.
Smalltalk on the otherhand is purely OO.
Can anyone explain is Java really is purely OO ?
And what exactly is a purely OO language ?
Kezia Matthews
Ranch Hand

Joined: May 19, 2001
Posts: 107
Hi Deepak,
A pure object oriented language is one in which all the code is written within the body of the class. This means all the variables and functions would be a part of the object of the class; except in the case of static members, which belong to the class as a whole and not to any particular object. No floating code exists.
Java is a pure object oriented language.
int, float, etc are primitive datatypes of the Java language and I don't think that, this has anything to do with the language being object oriented. Java also provides wrapper classes (Int, Float, etc for int and float datatypes respectively) for all the primitive data types, which can be used where the primitive types need to be used as objects.
Regards,
Kezia.
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
There is a lot of discussion going on about the "pureness" of Java's OO implementation.
Look at This discussion for instance
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
I can also recommend a search on Google Groups Advanced
Search on Pure OO in the *JAVA* newsgroups
and see the # hits. Have fun
By the way Kezia I think the general consensus is that Java can NOT be considered a pure OO language
Kezia Matthews
Ranch Hand

Joined: May 19, 2001
Posts: 107
Hi Johannes,
Thanks. I stand corrected.
Regards,
Kezia.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java pure Object Oriented ?