What is difference between these two.I google it down but could not find the satisfied answer.For example java is a oop(Object oriented programming) but not pure oop(was written on some sites).Can anybody explain?
-
Java enforces OOP (I.e. everything is in classes) whereas C++ is not specifically a OOP language, i.e. you can do things in C++ that does not require any kind of OOP but it's supported. Is this what you mean? – Phorce Feb 23 '15 at 11:40
-
2In a pure OO language, everything is an object, and every action is taken through them (Smalltalk, for instance). In a language like Java, there are other data types, primitives, and it is possible to have static members, which are called (or should be, at least) on a class, not on an object. – Stultuske Feb 23 '15 at 11:40
-
@ Phorce:-In java everything is not in classes.F.e int float(I know there are wrapper classes).Secondly data base in java is on in oops(Unless u choose hibernate). – Geek Feb 23 '15 at 11:42
-
Watch this [video](https://vimeo.com/43659004) you'll really find a different explanation of what OO really means. – Sriram Sakthivel Feb 23 '15 at 11:42
-
@iasias: yes, everything is in classes, but "in a class" does not mean "in an object". also, that's not what he meant. he didn't say a float IS a class, he said floats are used in classes (but I agree with you, his point was vague and incomplete at best) – Stultuske Feb 23 '15 at 11:43
-
@SriramSakthivel: the question is not "what is OO", the question is, "what is the difference between PURE OO and OO" – Stultuske Feb 23 '15 at 11:44
-
Any sort of expressed fundamental view (like "pure OOP") is indistinguishable from a parody of it. – Öö Tiib Feb 23 '15 at 11:44
-
There is no pure OOP languages in general use AFAIK. – Peter Lawrey Feb 23 '15 at 11:47
-
Note that in the case of current OOP languages, the methods for those objects are still procedural. I'm not sure what would be meant by a "pure OOP" language. – rcgldr Feb 23 '15 at 13:34
3 Answers
Java is oop but not pure because, There are Primitive data type in java like int, float etc. and they are not classes/Objects. This is only one reason that java is not Pure OOP. For example of Pure OOP . Objective C is Pure OOP language in which every thing is in the form of object.

- 538
- 10
- 20
Typically, in a pure OO language everything accessable in the language is an object (where even the classes that define objects can be object instances of meta-classes which in turn can be object instances of themselves). In Java and C++ there are basic language elements that aren't objects: most notably the primitive data types (or built-in types) such as int
, float
, char
etc.

- 27,315
- 3
- 37
- 54
-
1Better to say they're not class types - in C++, an *object* is any region of memory with a type, which includes `int`s, `float`s, `char`s, etc. – Joseph Mansfield Feb 23 '15 at 12:13
-
@JosephMansfield OK, but the C++ standard's use of the word "object" is *very* different to the classical OO use of the word. – Paul Evans Feb 23 '15 at 12:15
-
Sure, so describing it in terms of "classes", which basically has the same meaning across both example languages, is probably clearer. Or just clarify that you mean the OOP meaning of "object". – Joseph Mansfield Feb 23 '15 at 12:18
In a purely object-oriented language, everything is an object. However, in object-oriented languages, you may have non-object variables (e.g. static variables).

- 10,042
- 11
- 48
- 64