aspose file tools*
The moose likes Beginning Java and the fly likes How Java is pure object oriented language? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How Java is pure object oriented language?" Watch "How Java is pure object oriented language?" New topic
Author

How Java is pure object oriented language?

raul saini
Greenhorn

Joined: May 18, 2010
Posts: 18
This is my version of explanation, but I'm not confident only with this.

Java is OO because, it simply can not work without objects. Even if in a simple program we have to use objects to call methods and variables.

Please elaborate.

Thank You
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30965
    
158

I would argue "no" because Java has primitives that are not objects such as int.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
Hello Raul: This question has been asked about a gabillion times here and elsewhere, so you may do best to SearchFirst.

Much luck!
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19762
    
  20

raul saini wrote:Even if in a simple program we have to use objects to call methods and variables.

No you don't. A very easy example:
Sure, it doesn't do much, but there are absolutely no objects involved.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I'd argue I don't care anymore :)

I think Java is a poor example of an OO language, regardless of whether or not it's "pure"--and to me, that's a more important distinction. Part of it is a language design issue, part of it is how some things were implemented (I shouldn't need to use static methods from Arrays on an array), part of it is syntactic, part of it is the inability to have clean code reuse, part of it is that it just doesn't mesh with what I consider to be hallmarks of a powerful and effective language.

But no, I'd say it isn't pure, and more importantly, not very clean at all.
pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
David Newton wrote:
I'd argue I don't care anymore :)
//....
But no, I'd say it isn't pure, and more importantly, not very clean at all.


Sorry to get off topic, but this begs the question: which language do you feel best fulfills your criteria of a clean, relatively pure OOP (absolute purity is a bit over-rated), powerful and effective language?

Thanks!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

My go-to answer for this question is Smalltalk, because it's been around forever and everybody knows what it is. (Or should.) That said, though, there are a number of other possibility "cleanliness" candidates, depending on various nuances of the question. I'm also increasingly happy with many of the choices on the JVM, although I don't know Scala well enough to have a reasoned opinion.
 
 
subject: How Java is pure object oriented language?