• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is Java pure object oriented

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is the java a pure object oriented language. If not, please give me reasons. and what are native libraries.
Hoping quick reply...
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "Pure Object Oriented language"? people disagree on what this term means, so no answer can be given.

if you want to find more info, just search this very forum for that phrase. it gets asked at least once a month.
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
People may argue about specifics about what that term means, but it is very hard to say java is. The reason is simple, there are data types that are not objects(primitives), and if you really wanted to, you never have to use objects.

native libraries are libraries that are native to a language. The java library is one, the C++ standard and template libraries are another. Something to note about them, they are not always the best solution to a specific problem, so going outside of them for things like data structures, or even writing your own in necessary. The generic nature of them makes them useful but usually at a performance cost.

It is a fairly rare occurence that you need something else, but that fact and the fact that learning how to use libraries does not a programmer make.
 
author
Posts: 288
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It gives you all the benefits of an OO language:

�Re-use of previous work: using implementation inheritance and object composition.

�Real mapping to the problem domain: Objects map to real world and represent vehicles, customers, products etc: with encapsulation.

�Modular Architecture: Objects, systems, frameworks etc are the building blocks of larger systems.

Also, you can complement it with AOP (Aspect Oriented Programming). Supports
inheritance, encapsulation and polymorphism. That is good enough for me to build build applications

with increased quality and reduced development time. If 90% of the new application consists of proven existing components then only the remaining 10% of the code have to be tested from scratch. In theory anyway.
 
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Robert Hill:
People may argue about specifics about what that term means, but it is very hard to say java is. The reason is simple, there are data types that are not objects(primitives), and if you really wanted to, you never have to use objects.



In fact, Object is not even a type in Java.
 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
fred said it best. Asking "Is Java Object Oriented" is a silly question that gets asked way too often, and generally doesn't help anybody learn anything about Java, about "OO" ... and one that certainly doesn't help anybody design or program any better.

Sigh...

PS:
Hopefully the question "What are native libraries?" was answered to your satisfaction. My answer would be:

"Native Libraries" are functions written in another language, and executed
outside of the JVM. Native libraries are usually written in C or C++,
and usually do something that would be inefficient - or impossible -
to do directly in Java. Native functions are invoked using "JNI"
(Java Native Interface).
[ March 01, 2006: Message edited by: Paul Santa Maria ]
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It might be a useful question if it makes the original poster research and think about what "object oriented" is and is not. My personal view of "pure OO" is everything is an object and every operation is a message. In my short exposure to SmallTalk it seemed very pure and self consistent in this way, but I won't venture a percentage pure.

I think the Java/OO community lost a lot of meaning when it moved away from the "message" vocabulary. I liked reading "1 + 2" as sending the message "+ 2" to the "1" object. It seems to encourage me to think about "ask, don't tell" designs.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stan, very well said!
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stan James:
I liked reading "1 + 2" as sending the message "+ 2" to the "1" object.


sending the message "+" to the object "1" with the data "2".
...not that I advocate the Smalltalk nonsense.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Tony Morris:
...not that I advocate the Smalltalk nonsense.[/QB]



I'd find it easier to listen to what you advocate if you wouldn't label everything else as "nonsense"...
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The name of a Smalltalk method is the method and the parameters, so I think of it as the "+ 2" or "+ n" message. Not that it matters in this discussion. Smalltalk has a certain inner beauty; the fact that it was so totally backwards from what I knew before - from syntax to design - was quite challenging and exciting. I was disappointed we did not continue with it and it didn't catch on better in the industry. I think we'd all "get" this OO stuff better if we worked so backwards all the time.
 
Paul Santa Maria
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's an extremely interesting interview with Alan Kaye (the inventor of Smalltalk) - with much discussion of what he likes (and dislikes) about Java here:

http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=273&page=2
 
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for posting that, it was very interesting.

"Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves."

Truer words have never been spoken.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, very interesting article!

Some years ago, I attended a presentation on Squeak at a conference. The veterans attending nearly burst into tears that they typically had to use Java instead...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic