Why is it开发者_运维百科 said that the java language was developed on top of C, C++ ?
Is that because java virtual machine was developed in C, C++ ? because of the use of native functions in some classes?
Why is it said that the java language was developed on top of C, C++ ?
I would not say that, but it is not possible to address such a (reputed) statement without seeing the actual context in which it was made. Please provide a URL for the source of this statement ... or don't use the weasel words "it is said that ...".
It is true that low level parts of a JVM can be implemented in C or C++. But equally, they can be implemented in other languages. And besides, that is not sufficient to justify that statement (IMO).
In typical JVM implementations, native methods are implemented in C or C++. But in others, they are not. (Indeed, in the case of JNode, "native" methods are implemented in Java that has been precompiled to native code.)
It is also true that there are syntactic similarities between C, C++ and Java. But again, that is not sufficient to justify that statement (IMO).
I haven't heard anyone saying that Java was developed on top of C/C++, but that's beside the point.
What I think the intention here is that the original bunch (Gosling, Sheridan and others) intended to derive the syntax from C/C++, I assume to allow for easier transition.
I've never heard or read that statement, that Java was developed on top of C++. To some extent, it can be said to be derived from C++. A lot of the basic syntax is similar and the flow-control statements are also similar (if
, for
, while
etc). While, on the surface, the object oriented aspect of Java is also similar to the C++ approach, that is a deceptive similarity that is in reality very shallow. Java and C++ OO paradigm and implementation are more different than they are alike.
精彩评论