Mind you, java is pure object oriented!!

[Update 07-feb-2013. I was a noob when I wrote this one. Don’t consider it seriously]


“Java is not object oriented, since it has primitive data types!” , “int, char, float etc etc in java are not objects but primitive data-types. so how can it be object oriented?”

I’m reading the above crap in too often these days. Yeah, it does freak me out! Oh my dear java developers, if you come across any person ranting such nonsense, please check the credentials of the person. If someone says such things despite knowing java quite well, it only implies that the person lacks analytical thinking.

Let me get into the argument in this way: Let us say you are a the education minister of your state. And also an MLA of some constituency. Now how would you introduce yourself to some one? You will say you are an MLA? Or will you say you are the education minister? The answer is obvious.

Similarly, java does contain primitive data-types like int, float, double, boolean. But it should be remembered that it also contains wrapper class for all those data-types, like ‘Integer’ for ‘int’, ‘Float’ for ‘float’,’ Double’ for ‘double’,’ Boolean’ for ‘Boolean’. You can choose to never use the primitive data-types, and use only the wrapper class, it would’nt make much of a difference. But java programmers use the primitives only because its execution is faster. So the primitive data-types exists in java as an option(a good one), hence you can confidently say that java is a pure object oriented language.

I rest my case.