Java技术介绍-毕业论文外文翻译.docx
《Java技术介绍-毕业论文外文翻译.docx》由会员分享,可在线阅读,更多相关《Java技术介绍-毕业论文外文翻译.docx(15页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Java Technical DescriptionJava as a Programming Platform.Java is certainly a good programming language. There is no doubt that it is one of the better languages available to serious programmers. We think it could potentially have been a great programming language, but it is probably too late for tha
2、t. Once a language is out in the field, the ugly reality of compatibility with existing code sets in. Java was never just a language. There are lots of programming languages out there, and few of them make much of a splash. Java is a whole platform, with a huge library, containing lots of reusable c
3、ode, and an execution environment that provides services such as security, portability across operating systems, and automatic garbage collection. As a programmer, you will want a language with a pleasant syntax and comprehensible semantics (i.e., not C+). Java fits the bill, as do dozens of other f
4、ine languages. Some languages give you portability, garbage collection, and the like, but they dont have much of a library, forcing you to roll your own if you want fancy graphics or networking or database access. Well, Java has everythinga good language, a high-quality execution environment, and a
5、vast library. That combination is what makes Java an irresistible proposition to so many programmers.Features of Java.1.Simple We wanted to build a system that could be programmed easily without a lot of esoteric training and which leveraged todays standard practice. So even though we found that C+
6、was unsuitable, we designed Java as closely to C+ as possible in order to make the system more comprehensible. Java omits many rarely used, poorly understood, confusing features of C+ that, in our experience, bring more grief than benefit. The syntax for Java is, indeed, a cleaned-up version of the
7、syntax for C+. There is no need for header files, pointer arithmetic (or even a pointer syntax), structures, unions, operator overloading, virtual base classes, and so on. (See the C+ notes interspersed throughout the text for more on the differences between Java and C+.) The designers did not, howe
8、ver, attempt to fix all of the clumsy features of C+. For example, the syntax of the switch statement is unchanged in Java. If you know C+, you will find the transition to the Java syntax easy. If you are used to a visual programming environment (such as Visual Basic), you will not find Java simple.
9、 There is much strange syntax (though it does not take long to get the hang of it). More important, you must do a lot more programming in Java. The beauty of Visual Basic is that its visual design environment almost automatically provides a lot of the infrastructure for an application. The equivalen
10、t functionality must be programmed manually, usually with a fair bit of code, in Java. There are, however, third-party development environments that provide drag-and-drop-style program development. Another aspect of being simple is being small. One of the goals of Java is to enable the construction
11、of software that can run stand-alone in small machines. The size of the basic interpreter and class support is about 40K bytes; adding the basic standard libraries and thread support (essentially a self-contained microkernel) adds an additional 175K. 2. Object OrientedSimply stated, object-oriented
12、design is a technique for programming that focuses on the data (= objects) and on the interfaces to that object. To make an analogy with carpentry, an object-oriented carpenter would be mostly concerned with the chair he was building, and secondarily with the tools used to make it; a non-object-orie
13、nted carpenter would think primarily of his tools. The object-oriented facilities of Java are essentially those of C+.Object orientation has proven its worth in the last 30 years, and it is inconceivable that a modern programming language would not use it. Indeed, the object-oriented features of Jav
14、a are comparable to those of C+. The major difference between Java and C+ lies in multiple inheritance, which Java has replaced with the simpler concept of interfaces, and in the Java metaclass model. The reflection mechanism and object serialization feature make it much easier to implement persiste
15、nt objects and GUI builders that can integrate off-the-shelf components.3. Distributed Java has an extensive library of routines for coping with TCP/IP protocols like HTTP and FTP. Java applications can open and access objects across the Net via URLs with the same ease as when accessing a local file
16、 system. We have found the networking capabilities of Java to be both strong and easy to use. Anyone who has tried to do Internet programming using another language will revel in how simple Java makes onerous tasks like opening a socket connection. (We cover networking in Volume 2 of this book.) The
17、 remote method invocation mechanism enables communication between distributedobjects (also covered in Volume 2).There is now a separate architecture, the Java 2 Enterprise Edition (J2EE), that supports very large scale distributed applications.4. Robust Java is intended for writing programs that mus
18、t be reliable in a variety of ways. Java puts a lot of emphasis on early checking for possible problems, later dynamic (run-time) checking, and eliminating situations that are error-prone. The single biggest difference between Java and C/C+ is that Java has a pointer model that eliminates the possib
19、ility of overwriting memory and corrupting data. This feature is also very useful. The Java compiler detects many problems that, in other languages, would show up only at run time. As for the second point, anyone who has spent hours chasing memory corruption caused by a pointer bug will be very happ
20、y with this feature of Java. If you are coming from a language like Visual Basic that doesnt explicitly use pointers, you are probably wondering why this is so important. C programmers are not so lucky. They need pointers to access strings, arrays, objects, and even files. In Visual Basic, you do no
21、t use pointers for any of these entities, nor do you need to worry about memory allocation for them. On the other hand, many data structures are difficult to implement in a pointerless language. Java gives you the best of both worlds. You do not need pointers for everyday constructs like strings and
22、 arrays. You have the power of pointers if you need it, for example, for linked lists. And you always have complete safety, because you can never access a bad pointer, make memory allocation errors, or have to protect against memory leaking away.5. Secure Java is intended to be used in networked/dis
23、tributed environments. Toward that end, a lot of emphasis has been placed on security. Java enables the construction of virus-free, tamper-free systems. In the first edition of Core Java we said: Well, one should never say never again, and we turned out to be right. Not long after the first version
24、of the Java Development Kit was shipped, a group of security experts at Princeton University found subtle bugs in the security features of Java 1.0. Sun Microsystems has encouraged research into Java security, making publicly available the specification and implementation of the virtual machine and
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Java 技术 介绍 毕业论文 外文 翻译
限制150内