1 / 4
文档名称:

文献翻译原文.doc

格式:doc   大小:32KB   页数:4页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

文献翻译原文.doc

上传人:mh900965 2018/6/5 文件大小:32 KB

下载得到文件列表

文献翻译原文.doc

文档介绍

文档介绍:Comparing C++and Java
KeyWords:JAVA , C++ , Object-Oriented Programming , Class
As a C++ programmer, you already have the basic idea of object-oriented programming, and the syntax of Java no doubt looks familiar to you. This makes sense since Java was derived from C++. However, there are a surprising number of differences between C++ and Java. These differences are intended to be significant improvements, and if you understand the differences you’ll see why Java is such a beneficial programming language. This appendix takes you through the important features that distinguish Java from C++.
1. The biggest potential stumbling block is speed: interpreted Java runs in the range of 20times slower than C. Nothing prevents the Java language from piled and there are just-in-pilers appearing at this writing that offer significant speed-ups. It is not inconceivable that full pilers will appear for the more popular platforms, but without those there are classes of problems that will be insoluble with Java because of the speed issue.
2. Java has both kinds ments like C++ does.
3. Everything must be in a class. There are no global functions or global data. If you wantthe equivalent of globals, make static methods and static data within a class. There are no structs or enumerations or unions, only classes.
4. All method definitions are defined in the body of the class. Thus, in C++ it