English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

it is a java question

2007-03-17 00:13:13 · 3 answers · asked by engg 1 in Computers & Internet Programming & Design

3 answers

Some say that java is not 100% pure because it still supports primitive data types like int, float, char. However, some will also argue that it is 100% pure because those primitives can only be used within a class and that there are wrapper classes that exist for primitives.

Myself, I have always believed it is as close to an OOP as any other language has been. I don't think everything in a language has to be an object to be considered pure, especially when not everything should be a class. Why should an int variable "have to be"? Making everything a class doesn't solve everything.

My vote, because it still uses old style primitives from C (java was a language that came out of C/C++ back in the day). I would say it is only slightly more pure than C++. But that is my opinion.

Hope this helps!

2007-03-17 07:23:38 · answer #1 · answered by Martyr2 7 · 1 0

I'm guessing here, but I believe it is because the primitive variables are not objects. For example, if you declare an integer:
int x;
then x is not an object. You can declare an int object this way:
Integer x = new Integer(5);
This is an object.
However, since primitives are not objects, then it is not a pure OO language.

2007-03-17 00:53:31 · answer #2 · answered by so far north 3 · 0 0

because C++ is too effective for it really is personal sake. With C++, you are able to make a software it extremely is merchandise oriented, even if it really is likewise accessible to make non merchandise oriented software in C++, like procedural. possibly it really is the case that makes it no longer considered organic merchandise oriented, because you at the instantaneous are not compelled to create merchandise oriented software. you are able to also blend up merchandise oriented and procedural in C++.

2016-11-26 01:34:34 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers