作业帮 > 综合 > 作业

英语翻译Java is safer to use than C + + because it keeps you fro

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/08/10 09:05:28
英语翻译
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 model,and 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 programming languages.These checks go beyond syntactic checking to ensure that statements are semantically correct.Runtime checks are also more extensive 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 performscompiler-level type checking,adding redundancy to reliability.It also performs bounds checking and eliminates indirect object access,even under error conditions.
英语翻译Java is safer to use than C + + because it keeps you fro
Java比C++使用安全,ta可以阻止你编程出现的错误,同时也能让你更容易更简单的编程
Java将不会自动转换数据类型,你必须清楚地将一个类转换到另一类,C++,就是最不理想的条件下,也会自由地从一个类型转换到另一个类型.它具有汇编代码的所有灵活性,Java 不具有知道你现在做的是什么,但能确保你做过
C ++中的指针在Java中没有体现,你不可以在间接或者偶然地区访问对象,你也不需要去这么做,你声明然后直接引用就好,这样可以避免复杂的指针算法,如果你需要一个对象的索引集合你可以使用这个对象的数组.从编程模块中移除“对象的地址”的概念,且另一种过时的汇编语言也将会消失,所以,在Java中能够简单而且正确地编写程序,对于编译器和RunTime系统而言,Java超越了其他编程语言,在编译过程中能够检查所有编辑中的错误,而这些错误在其他编程语言中不能被发现,这些检查不是简单的语法检查,同时也要确保你的声明,语义是否正确.Runtime检查也更广泛,更有效.还记得老师和妈妈说过“做完题后要多检查一遍,确保正确性”?Java连接器确认Class类型,并在编译时进行类型检查,增加冗余可靠性.即使在错误的条件下,ta也对边界进行检查,并消除对象的间接访问
------能力有限,只能翻译成这样,有不足还请见谅,希望可以能够稍微帮到你!