【正文】
dely distributed on cell phones. We must confess that we haven’t yet seen a musthave Java application running on cell phones, but the usual fare of games and screen savers seems to be selling well in many markets. 人們希望構建一個無需深奧的專業(yè)訓練就可以進行編程的系統(tǒng),并且要符合當今的標準慣例。 HTML is a way to describe the structure of a web page. They have nothing in mon except that there are HTML extensions for placing Java applets on a web page. use XML, so I don’t need Java. Java is a programming language。1. Simple We wanted to build a system that could be programmed easily without a lot of esoteric training and which leveraged today’s standard practice. So even though we found that C++ was unsuitable, we designed Java as closely to C++ as possible in order to make the system more prehensible. 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 cleanedup version of the 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, however, 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 tran sition to the Java syntax easy. If you are used to a visual programming environment (such as Visual Basic), you will not find Java simple. 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 equivalent functionality must be programmed manually, usually with a fair bit of code, in Java. There are, however, thirdparty development environments that provide “draganddrop”style program development. Oriented Simply stated, objectoriented 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 “objectoriented” carpenter would be mostly concerned with the chair he was building, and secondarily with the tools used to make it。 a “nonobjectoriented” carpenter would think primarily of his tools. The objectoriented 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 objectoriented features of Java are parable 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. 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 system. Java is intended for writing programs that must be reliable in a variety of ways. Java puts a lot of emphasis on early checking for possible problems, later dynamic (runtime) checking, and eliminating situations that