• 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 is fully Obj Oreinted?

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai dudes,
As i got doubt when i was working with multiple inheritence prob.i got doubt that is java is fully object oreinted or partly.becoz some says that multiple inheritence is partial in java.with this does java become partly Obj Oriented?
plz clear my doubt possibly with an example.

thanks alot
regards,
Mahesh P
 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mahesh,

I have a better question: Why would it matter?

Seriously, what does it change if it is or if it is not?
Now, read your favorite definition of an OO language and
you should be able to tell whether Java is OO or not (with
regards to your "favorite" definition).

As to multiple inheritance: I don't see how this particular
issue would have a effect on a language being object oriented
or not.

Java has primitive types that are not objects (or that are
not instances of classes, or whatever) but that does not
make it a non object oriented language.

You see, the beauty (or the uglyness) of your question is
that people could argue about that for ages without actually
reaching a common agreement.

It is more important to realize that you may write an object
oriented program in Assembles and also that you might write
a program in java (or eiffel or maybe even smalltalk) that
isn't OO.

Best regards,
Petr
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To me a language is object-oriented if it supports the three pillars: encapsulation, inheritance and polymorphism. Java does all three pretty elegantly.

I've heard the expression "a true object-oriented language". Is that the same as "fully object-oriented"? I wouldn't say that Java fits that label, but nor does it aspire to. I imagine in a "true" OO language, everything would be an object; there'd be none of this dodgy package level (default) access or objects of one class having access to the private members of other objects of the same class. Would there be multiple inheritance? I dunno - probably. I honestly think that Java takes a pragmatic approach to OO and provides the useful capabilities while bending the restrictive rules that actually make development harder, not easier.

As Petr says, though, I think much of this discussion is academic. What's really important is that Java enables you to get the job done in an elegant and efficient way.

Jules
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many purists argue that "Java is not fully object-oriented" because it contains 8 data types that are not objects.

I'll let you form your own opinion on that.
 
We're being followed by intergalactic spies! Quick! Take this tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic