开发者

what makes java not pure object oriented language? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its curr开发者_开发技巧ent form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I think java is pure object oriented, but in real it is not. But i dont know why java is not pure object oriented language, please help me to find out the reason.


This is a homework question, right?

Primitive types, that's why. For instance try this:

int i = 42;
System.err.println(i.toString());


The usual objection is that Java is not "purely" OO because it has primitive types (int, double, etc.), which are not objects.


To make proof by contradiction: Java has int, and int, like all primitive types in Java, is not an Object. There are possibly more reasons, though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜