Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is Java a complete oop language?

 
Ramalingam Nachimuthu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Frnds,

Is Java a complete object oriented programming language? I have come across an article says that since java have primitives it's not complete oop language which should deal everything as objects.

Thanks..
 
dinesh Venkatesan
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ramalingam,

In my Perspective Java is a complete Object Oriented Language.
As you can see, Java also provides the Class version for the primitives.
e.g., Integer class for int, Double for double, so and so..
And from jdk 1.5 Java started to move towards your view much closer throught the "Autoboxing" concepts.

Why Java has primitives as non-classes in the sense to increase the speed and efficiency as already some critics complaining about Java programs speed they wanted to provide this option.

So we can choose according to our needs.

regards,
dinesh.
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dinesh Venkatesan:
Hi Ramalingam,

In my Perspective Java is a complete Object Oriented Language.
As you can see, Java also provides the Class version for the primitives.
e.g., Integer class for int, Double for double, so and so..
And from jdk 1.5 Java started to move towards your view much closer throught the "Autoboxing" concepts.


Hmm...so will the following code work?


Coming to the original question: Unfortunately there is no right answer for this, because nobody has defined what features a 'complete object oriented programming language' should support.

Java supports many object oriented features, but there are other languages that support more. For example, the following code is perfectly valid in Ruby



I would say, not to worry much about this.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12184
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question is routinly asked in the Beginners forum, although usually as "pure OO" rather than "complete OO". The general consensus is that the question makes no sense. ask any 5 people what the term "pure" or "complete OO" means, and you're likely to get 10 different answers.

So, until we can all agree on what is meant, there is no answer.

In other words, what is YOUR definition of "complete OO"? If you tell us that, then maybe we can have a discussion. The discussion might turn to why your definition is right/wrong, but that would be more meaningful than anything we can have now - although not by much.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12184
34
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nicholas Jordan:
[QB]
That is an issue I would like to bandy about with you in Meaningless DrivelQB]


So be it.
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very interesting answer taken from Wikipedia


OO languages can be grouped into several broad classes, determined by the extent to which they support all features and functionality of object-orientation and objects: classes, methods, polymorphism, inheritance, and reusability.

* Languages called "pure" OO languages, because everything in them is treated consistently as an object, from primitives such as characters and punctuation, all the way up to whole classes, prototypes, blocks, modules, etc. They were designed specifically to facilitate, even enforce, OO methods. Examples: Smalltalk, Eiffel, Ruby.
* Languages designed mainly for OO programming, but with some procedural elements. Examples: Java, Python.
* Languages that are historically procedural languages, but have been extended with some OO features. Examples: C++, Fortran 2003, Perl.
* Languages with most of the features of objects (classes, methods, inheritance, reusability), but in a distinctly original, even elegant, form. Examples: Oberon (Oberon-1 or Oberon-2).
* Languages with abstract data type support, but not all features of object-orientation, sometimes called object-based languages. Examples: Modula-2 (with excellent encapsulation and information hiding), Pliant.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Edwin Dalorzo:
This is a very interesting answer taken from Wikipedia



I like that one! Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic