猜人游戏主持人亲自:急~计算机英语文章翻译!望各位达人鼎力相助!(02)

来源:百度文库 编辑:高校问答 时间:2024/04/30 14:38:59
Java provides all he luxuries of object-oriented programming:class hierarchy,inheritance,encapsulation,and polymorphism--in a context that is truly useful and efficient.

The main reason for developing object-oriented software,besides clarity and simplicity,is the desperate hope that somehow the objects you develop will be reused.Java not only encourages software reused.Java not only encourages software reuse,it demands it.To write any sort of Java program,no matter how simple,you must build on the classes and methods of the Java API.

Once you have begun developing software in Java,you have two choices:
● Build on the classes you have developed,thereby reusing them.
● Rewrite your software from scratch,copying and tailoring useful parts of existing software.

With Java,the temptation to start from scratch is no longer appealing.Java's object-oriented structure forces you to decelop more useful,more tailorable, and much simpler software the first time around.

3.Java Is Safer and More Reliable
Java is safer to use than C++ because it keeps you from doing the things that you do badly,while making it easier to do the things that you do well.

Java won't automatically convert data types.You have to explicitly convert from one class to another.C++,under the most undesirable conditions,will automatically convert one type to another.It has all the flexibility of assembly code.Java doesn''t assume that you know what you are doing.It makes sure that you do.

C++ pointers don't exist in Java.You can no longer access objects indirectly or by chance.You don't need to.You declare objects and reference those objects directly.Complex pointer arithmetic is avoided.If you need an indexed set of objects,you can use an array of objects.The concept of "the address of an object" is eliminated from the programming errors that go another assembly language dinosaur is laid to rest.As a result,it becomes much easier to do things correctly in Java.

Java's reliability extends beyond the language level to the compiler and the runtime system.Compile-time checks identify many programming errors that go undetected in other progamming languages.These checks go beyond syntactic checking to ensure that statements are semantically correct.

Runtime checks are also more extendsive and effective.Remember your teacher or mom telling you to "Check your work twice to make sure it's right?"The Java linker understands class types and performs compiler-level type checking,adding redundancy to reliability.It also performs bounds checking and eliminates indirect object access,even under error conditions.

翻译如下:
他向所有的爪哇奢侈品面向对象的节目:等级阶层、继承、封装、多态性--背景是真正的效用.
主要原因发展面向对象的软件,除了清晰和简单,就是绝望,希望有对象你发展将reused.java不仅鼓励软件reused.java不仅鼓励软件使用,它要求it.To写任何东西爪哇节目,不管简单,你一定要建立在班级和方法的爪哇短片.
一旦你已经开始在爪哇软件开发,你有两个选择: ●基础课你有新的发展,从而重用. ●软件改写你从头、复制、裁剪现有软件有用部分.
在爪哇诱惑从零开始不再Appealing.java的面向对象的结构更为有用decelop你力量,更tailorable,软件简单得多首次左右. 3.java更安全、更可靠 爪哇是使用安全,因为它比C++一直在做的事你说你做得不好,这样方便看.
爪哇不会自动数据转换Types.you有明确的转换,以阶级ANOTHER.C++,在最恶劣的条件下,将自动转换一种以another.It完全弹性大会Code.javadoesn''t以为你知道你是doing.It就会让你.
丙++要点以外并不存在于Java.you再也不能准入物体间接或由chance.You并不需要to.You申报物体和参考这些物体Directly.complex教鞭的计算是Avoided.if你需要一个编制索引的一套物体,你可以运用各种objects.The概念,"地址一个物体"是淘汰出来的方案拟订误差说走另一种汇编语言恐龙就是奠定rest.as结果是,就更容易做一些事了正确的爪哇.
爪哇的可靠性超越语言上的编辑和runtimesystem.compile及时检查找出许多错误的方案,忽视其他progammingLanguages.these检查核对超越中文确保报表正确表述. runtime检查,也更extendsiveeffective.remember妈妈告诉你或你的老师"两次检查工作,以确保您是正确的. "爪哇Linker理解和类型进行汇编级级式检查,并进行裁员,也reliability.it式检查,消除物体间接接触,即使在错误的条件