计算机专业外文翻译THINK IN JAVA
Java编程语言外文翻译、英汉互译、中英对照

文档从互联网中收集,已重新修正排版,word格式支持编辑,如有帮助欢迎下载支持。
外文翻译原文及译文学院计算机学院专业计算机科学与技术班级学号姓名指导教师负责教师Java(programming language)Java is a general-purpose, concurrent, class-based, object-oriented computer program- -ming language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. Java applications are typically compiled to byte code (class file) that can run on any Java virtual machine(JVM) regardless of computer architecture. Java is, as of 2012, one of the most popular programming languages in use, particularly for client-server web applications, with a reported 10 million users. Java was originally developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++, but it has fewer low-level facilities than either of them.The original and reference implementation Java compilers, virtual machines, and class libraries were developed by Sun from 1991 and first released in 1995. As of May 2007, in compliance with the specifications of the Java Community Process, Sun relicensed most of its Java technologies under the GNU General Public License. Others have also developed alternative implementations of these Sun technologies, such as the GNU Compiler for Java and GNU Classpath.Java is a set of several computer software products and specifications from Sun Microsystems (which has since merged with Oracle Corporation), that together provide a system for developing application software and deploying it in across-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones on the low end, to enterprise servers and supercomputers on the high end. While less common, Java appletsare sometimes used to provide improved and secure functions while browsing the World Wide Web on desktop computers.Writing in the Java programming language is the primary way to produce code that will be deployed as Java bytecode. There are, however, byte code compilers available forother languages such as Ada, JavaScript, Python, and Ruby. Several new languages have been designed to run natively on the Java Virtual Machine (JVM), such as Scala, Clojure and Groovy.Java syntax borrows heavily from C and C++, but object-oriented features are modeled after Smalltalk and Objective-C. Java eliminates certain low-level constructs such as pointers and has a very simple memory model where every object is allocated on the heap and all variables of object types are references. Memory management is handled through integrated automatic garbage collection performed by the JVM.An edition of the Java platform is the name for a bundle of related programs from Sun that allow for developing and running programs written in the Java programming language. The platform is not specific to any one processor or operating system, but rather an execution engine (called a virtual machine) and a compiler with a set of libraries that are implemented for various hardware and operating systems so that Java programs can run identically on all of them. The Java platform consists of several programs, each of which provides a portion of its overall capabilities. For example, the Java compiler, which converts Java source code into Java byte code (an intermediate language for the JVM), is provided as part of the Java Development Kit (JDK). The Java Runtime Environment(JRE), complementing the JVM with a just-in-time (JIT) compiler, converts intermediate byte code into native machine code on the fly. An extensive set of libraries are also part of the Java platform.The essential components in the platform are the Java language compiler, the libraries, and the runtime environment in which Java intermediate byte code "executes" according to the rules laid out in the virtual machine specification.In most modern operating systems (OSs), a large body of reusable code is provided to simplify the programmer's job. This code is typically provided as a set of dynamically loadable libraries that applications can call at runtime. Because the Java platform is not dependent on any specific operating system, applications cannot rely on any of the pre-existing OS libraries. Instead, the Java platform provides a comprehensive set of its own standard class libraries containing much of the same reusable functions commonly found in modern operating systems. Most of the system library is also written in Java. For instance, Swing library paints the user interface and handles the events itself, eliminatingmany subtle differences between how different platforms handle even similar components.The Java class libraries serve three purposes within the Java platform. First, like other standard code libraries, the Java libraries provide the programmer a well-known set of functions to perform common tasks, such as maintaining lists of items or performing complex string parsing. Second, the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily intertwined with the distinctive implementations of each platform. The and java.io libraries implement an abstraction layer in native OS code, then provide a standard interface for the Java applications to perform those tasks. Finally, when some underlying platform does not support all of the features a Java application expects, the class libraries work to gracefully handle the absent components, either by emulation to provide a substitute, or at least by providing a consistent way to check for the presence of a specific feature.The success of Java and its write once, run anywhere concept has led to other similar efforts, notably the .NET Framework, appearing since 2002, which incorporates many of the successful aspects of Java. .NET in its complete form (Microsoft's implementation) is currently only fully available on Windows platforms, whereas Java is fully available on many platforms. .NET was built from the ground-up to support multiple programming languages, while the Java platform was initially built to support only the Java language, although many other languages have been made for JVM since..NET includes a Java-like language called Visual J# (formerly named J++) that is incompatible with the Java specification, and the associated class library mostly dates to the old JDK 1.1 version of the language. For these reasons, it is more a transitional language to switch from Java to the .NET platform, than a first class .NET language. Visual J# was discontinued with the release of Microsoft Visual Studio 2008. The existing version shipping with Visual Studio 2005will be supported until 2015 as per the product life-cycle strategy.In June and July 1994, after three days of brainstorming with John Gage, the Director of Science for Sun, Gosling, Joy, Naughton, Wayne Rosing, and Eric Schmidt, the team re-targeted the platform for the World Wide Web. They felt that with the advent of graphical web browsers like Mosaic, the Internet was on its way to evolving into the samehighly interactive medium that they had envisioned for cable TV. As a prototype, Naughton wrote a small browser, Web Runner (named after the movie Blade Runner), later renamed Hot Java.That year, the language was renamed Java after a trademark search revealed that Oak was used by Oak Technology. Although Java 1.0a was available for download in 1994, the first public release of Java was 1.0a2 with the Hot Java browser on May 23, 1995, announced by Gage at the Sun World conference. His announcement was accompanied by a surprise announcement by Marc Andreessen, Executive Vice President of Netscape Communications Corporation, that Netscape browsers would be including Java support. On January 9, 1996, the Java Soft group was formed by Sun Microsystems to develop the technology.Java编程语言Java是一种通用的,并发的,基于类的并且是面向对象的计算机编程语言,它是为实现尽可能地减少执行的依赖关系而特别设计的。
JAVA外文文献+翻译

Java and the InternetIf Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re coming from a traditional programming perspective. Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web.1.Client-side programmingThe Web’s initial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl is acommon choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data must be sent, as well as the load on both the server and the Internet. (On top of this, starting a CGI program tends to be slow.) The initial designers of the Web did not foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed. For example, any sort of dynamic graphing is nearly impossible to perform with consistency because a GIF file must be created and moved from the server to the client for each version of the graph. And you’ve no doubt had direct experience with something as simple as validating the data on an input form. You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; you must then back up a page and try again. Not only is this slow, it’s inelegant.The solution is client-side programming. Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page. Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience at your Web site.The problem with discussions of client-side programming is that they aren’t very different from discussions of programming in general. The parameters are almost the same, but the platform is different: a Web browser is like a limited operating system. In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming. The rest of this section provides an overview of the issues and approaches in client-side programming.2.Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in. This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself into the appropriate spot in the browser. It tells the browser “from now on you can perform this new activity.” (You ne ed to download the plug-in only once.) Some fast and powerful behavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t something you’d want to do as part of the process of building a particular site. The value of the plug-in for client-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer. Thus, plug-ins provide a “back door” that allows the creation of new client-side programming languages (although not all languages are implemented as plug-ins).3.Scripting languagesPlug-ins resulted in an explosion of scripting languages. With a scripting language you embed the source code for your client-side program directly into the HTML page, and the plug-in that interprets that language is automatically activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The trade-off is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly sophisticated things with scripting languages so this is not too much of a hardship.This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in client-side programming. Your problems might very well fit completely withinthat 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming.The most commonly discussed browser scripting languages are JavaScript (which has nothing to do with Java; it’s named that way just to grab some of Java’s marketing momentum), VBScript (which looks like Visual Basic), and Tcl/Tk, which comes from the popular cross-platform GUI-building language. There are others out there, and no doubt more in development.JavaScript is probably the most commonly supported. It comes built into both Netscape Navigator and the Microsoft Internet Explorer (IE). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript. However, if you’re already fluent in Visual Basic or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing with the Web issues already.)4.JavaIf a scripting language can solve 80 percent of the client-side programming problems, what about the other 20 percent—the “really hard stuff?” The most popular solution today is Java. Not only is it a powerful programming language built to be secure, cross-platform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, network programming, and distributed computing. Java allows client-side programming via the applet.An applet is a mini-program that will run only under a Web browser. The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded). When the applet is activated it executes a program. This is part of its beauty—it provides you with a way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner. The user gets the latest version of the client software without fail and without difficult reinstallation. Because of theway Java is designed, the programmer needs to create only a single program, and that program automatically works with all computers that have browsers with built-in Java interpreters. (This safely includes the vast majority of machines.) Since Java is a full-fledged programming language, you can do as much work as possible on the client before and after making requests of the server. F or example, you won’t need to send a request form across the Internet to discover that you’ve gotten a date or some other parameter wrong, and your client computer can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you. Not only do you get the immediate win of speed and responsiveness, but the general network traffic and load on servers can be reduced, preventing the entire Internet from slowing down.One advantage a Java applet has ove r a scripted program is that it’s in compiled form, so the source code isn’t available to the client. On the other hand, a Java applet can be decompiled without too much trouble, but hiding your code is often not an important issue. Two other factors can be important. As you will see later in this book, a compiled Java applet can comprise many modules and take multiple server “hits” (accesses) to download. (In Java 1.1 and higher this is minimized by Java archives, called JAR files, that allow all the required modules to be packaged together and compressed for a single download.) A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits). This could be important to the responsiveness of your Web site. Another factor is the all-important learning curve. Regardless of what you’ve heard, Java is not a trivial language to learn. If you’re a Visual Basic programmer, moving to VBScript will be your fastest solution, and since it will probably solve most typical client/server problems you might be hard pressed to justify learning Java. If you’re experienced with a scripting language you will certainly benefit from looking at JavaScript or VBScript before committing to Java, since they might fit your needs handily and you’ll be more productive sooner.to run its applets withi5.ActiveXTo some degree, the competitor to Java is Microsoft’s ActiveX, although it takes a completely different approach. ActiveX was originally a Windows-only solution, although it is now being developed via an independent consortium to become cross-platform. Effectively, ActiveX says “if your program connects to its environment just so, it can be dropped into a Web page and run under a browser that supports ActiveX.” (I E directly supports ActiveX and Netscape does so using a plug-in.) Thus, ActiveX does not constrain you to a particular language. If, for example, you’re already an experienced Windows programmer using a language such as C++, Visual Basic, or Borland’s Del phi, you can create ActiveX components with almost no changes to your programming knowledge. ActiveX also provides a path for the use of legacy code in your Web pages.6.SecurityAutomatically downloading and running programs across the Internet can sound like a virus-builder’s dream. ActiveX especially brings up the thorny issue of security in client-side programming. If you click on a Web site, you might automatically download any number of things along with the HTML page: GIF files, script code, compiled Java code, and ActiveX components. Some of these are benign; GIF files can’t do any harm, and scripting languages are generally limited in what they can do. Java was also designed to run its applets within a “sandbox” of safety, which prevents it from wri ting to disk or accessing memory outside the sandbox.ActiveX is at the opposite end of the spectrum. Programming with ActiveX is like programming Windows—you can do anything you want. So if you click on a page that downloads an ActiveX component, that component might cause damage to the files on your disk. Of course, programs that you load onto your computer that are not restricted to running inside a Web browser can do the same thing. Viruses downloaded from Bulletin-Board Systems (BBSs) have long been a problem, but the speed of the Internet amplifies the difficulty.The solution seems to be “digital signatures,” whereby code is verified to show who the author is. This is based on the idea that a virus works because its creator can be anonymous, so if you remove the anonymity individuals will be forced to be responsible for their actions. This seems like a good plan because it allows programs to be much more functional, and I suspect it will eliminate malicious mischief. If, however, a program has an unintentional destructive bug it will still cause problems.The Java approach is to prevent these problems from occurring, via the sandbox. The Java interpreter that lives on your local Web browser examines the applet for any untoward instructions as the applet is being loaded. In particular, the applet cannot write files to disk or erase files (one of the mainstays of viruses). Applets are generally considered to be safe, and since this is essential for reliable client/server systems, any bugs in the Java language that allow viruses are rapidly repaired. (It’s worth noting that the browser software actually enforces these security restrictions, and some browsers allow you to select different security levels to provide varying degrees of access to your system.) You might be skeptical of this rather draconian restriction against writing files to your local disk. For example, you may want to build a local database or save data for later use offline. The initial vision seemed to be that eventually everyone would get online to do anything important, but that was soon seen to be impractical (although low-cost “Internet appliances” might someday satisfy the needs of a significant segment of users). The solution is the “signed applet” that uses public-key encryption to verify that an applet does indeed come from where it claims it does. A signed applet can still trash your disk, but the theory is that since you can now hold the applet creator accountable they won’t do vicious things. Java provides a framework for digital signatures so that you will eventually be able to allow an applet to step outside the sandbox if necessary. Digital signatures have missed an important issue, which is the speed that people move around on the Internet. If you download a buggy program and it does something untoward, how long will it be before you discover the damage? It could be days or even weeks. By then, how will you track down the program that’s done it? And what good will it do you at that point?7.Internet vs. intranetThe Web is the most general solution to the client/server problem, so it makes sense that you can use the same technology to solve a subset of the problem, in particular the classic client/server problem within a company. With traditional client/server approaches you have the problem of multiple types of client computers, as well as the difficulty of installing new client software, both of which are handily solved with Web browsers and client-side programming. When Web technology is used for an information network that is restricted to a particular company, it is referred to as an intranet. Intranets provide much greater security than the Internet, since you can physically control access to the servers within your company. In terms of training, it seems that once people und erstand the general concept of a browser it’s much easier for them to deal with differences in the way pages and applets look, so the learning curve for new kinds of systems seems to be reduced.The security problem brings us to one of the divisions that seems to be automatically forming in the world of client-side programming. If your program is running on the Internet, you don’t know what platform it will be working under, and you want to be extra careful that you don’t disseminate buggy code. You need something cross-platform and secure, like a scripting language or Java.If you’re running on an intranet, you might have a different set of constraints. It’s not uncommon that your machines could all be Intel/Windows platforms. On an intranet, you’re respon sible for the quality of your own code and can repair bugs when they’re discovered. In addition, you might already have a body of legacy code that you’ve been using in a more traditional client/server approach, whereby you must physically install client programs every time you do an upgrade. The time wasted in installing upgrades is the most compelling reason to move to browsers, because upgrades are invisible and automatic. If you are involved in such an intranet, the most sensible approach to take is the shortest path that allows you to use your existing code base, rather than trying to recode your programs in a new language.When faced with this bewildering array of solutions to the client-side programming problem, the best plan of attack is a cost-benefit analysis. Consider the constraints of your problem and what would be the shortest path to your solution. Since client-side programming is still programming, it’s always a good idea to take the fastest development approach for your particular situation. This is an aggressive stance to prepare for inevitable encounters with the problems of program development.8.Server-side programmingThis whole discussion has ignored the issue of server-side programming. What happens when you make a request of a server? Most of the time the request is simply “send me this file.” Your browser then interprets the file in some appropriate fashion: as an HTML page, a graphic image, a Java applet, a script program, etc. A more complicated request to a server generally involves a database transaction. A common scenario involves a request for a complex database search, which the server then formats into an HTML page and sends to you as the result. (Of course, if the client has more intelligence via Java or a scripting language, the raw data can be sent and formatted at the client end, which will be faster and less load on the server.) Or you might want to register your name in a database when you join a group or place an order, which will involve changes to that database. These database requests must be processed via some code on the server side, which is generally referred to as server-side programming. Traditionally, server-side programming has been performed using Perl and CGI scripts, but more sophisticated systems have been appearing. These include Java-based Web servers that allow you to perform all your server-side programming in Java by writing what are called servlets. Servlets and their offspring, JSPs, are two of the most compelling reasons that companies who develop Web sites are moving to Java, especially because they eliminate the problems of dealing with differently abled browsers.9. separate arena: applicationsMuch of the brouhaha over Java has been over applets. Java is actually a general-purpose programming language that can solve any type of problem—at least in theory. And as pointed out previously, there might be more effective ways to solve most client/server problems. When you move out of the applet arena (and simultaneously release the restrictions, such as the one against writing to disk) you enter the world of general-purpose applications that run standalone, without a Web browser, just like any ordinary program does. Here, Java’s strength is not only in its portability, but also its programmability. As you’l l see throughout this book, Java has many features that allow you to create robust programs in a shorter period than with previous programming languages. Be aware that this is a mixed blessing. You pay for the improvements through slower execution speed (although there is significant work going on in this area—JDK 1.3, in particular, introduces the so-called “hotspot” performance improvements). Like any language, Java has built-in limitations that might make it inappropriate to solve certain types of programming problems. Java is a rapidly evolving language, however, and as each new release comes out it becomes more and more attractive for solving larger sets of problems.Java和因特网既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不是很明显。
计算机外文文献及翻译(SSH)

附录AHistoryDuke, the Java mascotJames Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time. The language was initially called Oak after an oak tree that stood outside Gosling's office; it went by the name Green later, and was later renamed Java, from a list of random words.Gosling aimed to implement a virtual machine and a language that had a familiar C/C++ style of notation.Sun Microsystems released the first public implementation as Java 1.0 in 1995. It promised "Write Once, Run Anywhere" (WORA), providing no-cost run-times on popular platforms. Fairly secure and featuring configurable security, it allowed network- and file-access restrictions. Major web browsers soon incorporated the ability to run Java applets within web pages, and Java quickly became popular. With the advent of Java 2 (released initially as J2SE 1.2 in December 1998–1999), new versions had multiple configurations built for different types of platforms. For example, J2EE targeted enterprise applications and the greatly stripped-down version J2ME for mobile applications (Mobile Java). J2SE designated the Standard Edition. In 2006, for marketing purposes, Sun renamed new J2 versions as Java EE, Java ME, and Java SE, respectively.In 1997, Sun Microsystems approached the ISO/IEC JTC1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process. Java remains a de facto standard, controlled through the Java Community Process. At one time, Sun made most of its Java implementations available without charge, despite their proprietary software status. Sun generated revenue from Java through the selling of licenses for specialized products such as the Java Enterprise System. Sun distinguishes between its Software Development Kit (SDK) and Runtime Environment (JRE) (a subset of the SDK); the primary distinction involves the JRE's lack of the compiler, utility programs, and header files.On November 13, 2006, Sun released much of Java as open source software under the terms of the GNU General Public License (GPL). On May 8, 2007, Sun finished the process, making all of Java's core code available under free software/open-source distribution terms, aside from a small portion of code to which Sun did not hold the copyright.Sun's vice-president Rich Green has said that Sun's ideal role with regards to Java is as an "evangelist." Following Oracle Corporation's acquisition of Sun Microsystems in 2009–2010, Oracle has described itself as the "steward of Java technology with a relentless commitment to fostering a community of participation and transparency".PrinciplesThere were five primary goals in the creation of the Java language:1.It should be "simple, object oriented, and familiar"、2.It should be "robust and secure".3.It should be "architecture neutral and portable"、4.It should execute with "high performance"、5.It should be "interpreted, threaded, and dynamic".Java PlatformMain articles: Java (software platform) and Java Virtual Machine One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any supported hardware/operating-system platform. This is achieved by compiling the Java language code to an intermediate representation called Java bytecode, instead of directly to platform-specific machine code. Java bytecode instructions are analogous to machine code, but are intended to be interpreted by a virtual machine (VM) written specifically for the host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications, or in a Web browser for Java applets. Standardized libraries provide a generic way to access host-specific features such as graphics, threading, and networking.A major benefit of using bytecode is porting. However, the overhead of interpretation means that interpreted programs almost always run more slowly than programs compiled to native executables would. Just-in-Time compilers were introduced from an early stage that compile bytecodes to machine code during runtime.ImplementationsSun Microsystems officially licenses the Java Standard Edition platform for Linux, Mac OS X, and Solaris. Although in the past Sun has licensed Java to Microsoft, the license has expired and has not been renewed. Through a network of third-party vendors and licensees, alternative Java environments are available for these and other platforms.Sun's trademark license for usage of the Java brand insists that all implementations be "compatible". This resulted in a legal dispute with Microsoft after Sun claimed that the Microsoft implementation did not support RMI or JNI and had added platform-specific features of their own. Sun sued in 1997, and in 2001 won a settlement of US$20 million, as well as a court order enforcing the terms of the license from Sun. As a result, Microsoft no longer ships Java with Windows, and in recent versions of Windows, Internet Explorer cannot support Java applets without a third-party plugin. Sun, and others, have made available free Java run-time systems for those and other versions of Windows.Platform-independent Java is essential to the Java EE strategy, and an even more rigorous validation is required to certify an implementation. This environment enables portable server-side applications, such as Web services, Java Servlets, and Enterprise JavaBeans, as well as with embedded systems based on OSGi, using Embedded Java environments. Through the new GlassFish project, Sun is working to create a fully functional, unified open source implementation of the Java EE technologies.Sun also distributes a superset of the JRE called the Java Development Kit (commonly known as theJDK), which includes development tools such as the Java compiler, Javadoc, Jar, and debugger.Java performance and garbage collectorsPrograms written in Java have a reputation for being slower and requiring more memory than those written in C. However, Java programs' execution speed improved significantly with the introduction of Just-in-time compilation in 1997/1998 for Java1.1, the addition of language features supporting better code analysis (such as inner classes, StringBuffer class, optional assertions, etc.), and optimizations in the Java Virtual Machine itself, such as HotSpot becoming the default for Sun's JVM in 2000. Currently, Java code has approximately half the performance of C code.Some platforms offer direct hardware support for Java; there are microcontrollers that can run java in hardware instead of a software JVM, and ARM based processors can have hardware support for executing Java bytecode through its Jazelle option. Automatic memory managementJava uses an automatic garbage collector to manage memory in the object lifecycle. The programmer determines when objects are created, and the Java runtime is responsible for recovering the memory once objects are no longer in use. Once no references to an object remain, the unreachable memory becomes eligible to be freed automatically by the garbage collector. Something similar to a memory leak may still occur if a programmer's code holds a reference to an object that is no longer needed, typically when objects that are no longer needed are stored in containers that are still in use. If methods for a nonexistent object are called, a "null pointer exception" is thrown.One of the ideas behind Java's automatic memory management model is that programmers can be spared the burden of having to perform manual memory management. In some languages, memory for the creation of objects is implicitly allocated on the stack, or explicitly allocated and deallocated from the heap. In the latter case the responsibility of managing memory resides with the programmer. If the program does not deallocate an object, a memory leak occurs. If the program attempts to access or deallocate memory that has already been deallocated, the result is undefined and difficult to predict, and the program is likely to become unstable and/or crash. This can be partially remedied by the use of smart pointers, but these add overhead and complexity. Note that garbage collection does not prevent "logical" memory leaks, i.e. those where the memory is still referenced but never used.Garbage collection may happen at any time. Ideally, it will occur when a program is idle. It is guaranteed to be triggered if there is insufficient free memory on the heap to allocate a new object; this can cause a program to stall momentarily. Explicit memory management is not possible in Java.Java does not support C/C++ style pointer arithmetic, where object addresses and unsigned integers (usually long integers) can be used interchangeably. This allows the garbage collector to relocate referencedobjects and ensures type safety and security. As in C++ and some other object-oriented languages, variables of Java's primitive data types are not objects. Values of primitive types are either stored directly in fields (for objects) or on the stack (for methods) rather than on the heap, as commonly true for objects (but see Escape analysis). This was a conscious decision by Java's designers for performance reasons. Because of this, Java was not considered to be a pure object-oriented programming language. However, as of Java 5.0, autoboxing enables programmers to proceed as if primitive types were instances of their wrapper class. Java contains multiple types of garbage collectors. By default, HotSpot uses the Concurrent Mark Sweep collector, also known as the CMS Garbage Collector. However, there are also several other garbage collectors that can be used to manage the Heap. For 90% of applications in Java, the CMS Garbage Collector is good enough.A class that is not declared public may be stored in any .java file. The compiler will generate a class file for each class defined in the source file. The name of the class file is the name of the class, with .class appended. For class file generation, anonymous classes are treated as if their name were the concatenation of the name of their enclosing class, a $, and an integer.The keyword public denotes that a method can be called from code in other classes, or that a class may be used by classes outside the class hierarchy. The class hierarchy is related to the name of the directory in which the .java file is located.The keyword static in front of a method indicates a static method, which is associated only with the class and not with any specific instance of that class. Only static methods can be invoked without a reference to an object. Static methods cannot access any method variables that are not static.The keyword void indicates that the main method does not return any value to the caller. If a Java program is to exit with an error code, it must call System.exit() explicitly.The method name "main" is not a keyword in the Java language. It is simply the name of the method the Java launcher calls to pass control to the program. Java classes that run in managed environments such as applets and Enterprise JavaBean do not use or need a main() method. A java program may contain multiple classes that have main methods, which means that the VM needs to be explicitly told which class to launch from.The main method must accept an array of String objects. By convention, it is referenced as args although any other legal identifier name can be used. Since Java 5, the main method can also use variable arguments, in the form of public static void main(String... args), allowing the main method to be invoked with an arbitrary number of String arguments. The effect of this alternate declaration is semantically identical (the args parameter is still an array of String objects), but allows an alternative syntax for creating and passing the array.The Java launcher launches Java by loading a given class (specified on the command line or as an attribute in a JAR) and starting its public static void main(String[]) method. Stand-alone programs must declare this method explicitly. The String[] args parameter is an array of String objects containing any arguments passed to the class. The parameters to main are often passed by means of a command line.Criticism of JavaA number of criticisms have been leveled at Java programming language for various design choices in the language and platform. Such criticisms include the implementation of generics, the handling of unsigned numbers, the implementation of floating-point arithmetic, and security vulnerabilities.Class librariesJava Platform and Class libraries diagramJava libraries are the compiled bytecodes of source code developed by the JRE implementor to support application development in Java. Examples of these libraries are: The core libraries, which include:Collection libraries that implement data structures such as lists, dictionaries, trees, sets, queues and double-ended queue, or stacksXML Processing (Parsing, Transforming, Validating) librariesSecurityInternationalization and localization librariesThe integration libraries, which allow the application writer to communicate with external systems. These libraries include:The Java Database Connectivity (JDBC) API for database accessJava Naming and Directory Interface (JNDI) for lookup and discoveryRMI and CORBA for distributed application developmentJMX for managing and monitoring applicationsUser interface libraries, which include:The (heavyweight, or native) Abstract Window Toolkit (AWT), which provides GUI components, the means for laying out those components and the means for handling events from those componentsThe (lightweight) Swing libraries, which are built on AWT but provide (non-native) implementations of the AWT widgetryAPIs for audio capture, processing, and playbackA platform dependent implementation of Java Virtual Machine (JVM) that is the means by which the byte codes of the Java libraries and third party applications are executedPlugins, which enable applets to be run in Web browsersJava Web Start, which allows Java applications to be efficiently distributed to end-users across the InternetLicensing and documentation.DocumentationMain article: JavadocJavadoc is a comprehensive documentation system, created by Sun Microsystems, used by many Java developers. It provides developers with anorganized system for documenting their code. Javadoc comments have an extra asterisk at the beginning, i.e. the tags are /** and */, whereas the normal multi-line comment tags comments in Java and C are set off with /* and */.Sun has defined and supports four editions of Java targeting different application environments and segmented many of its APIs so that they belong to one of the platforms. The platforms are:Java Card for smartcards.、Java Platform, Micro Edition(Java ME) —targeting environments with limited resources、Java Platform, Standard Edition (Java SE) — targeting workstation environments、Java Platform, Enterprise Edition (Java EE) — targeting large distributed enterprise or Internet environments. The classes in the Java APIs are organized into separate groups called packages. Each package contains a set of related interfaces, classes and exceptions. Refer to the separate platforms for a description of the packages available.The set of APIs is controlled by Sun Microsystems in cooperation with others through the Java Community Process program. Companies or individuals participating in this process can influence the design and development of the APIs. This process has been a subject of controversy. Sun also provided an edition called PersonalJava that has been superseded by later, standards-based Java ME configuration-profile pairings.JSP ProfileJSP (JavaServer Pages) is initiated by Sun Microsystems, Inc., with many companies to participate in the establishment of a dynamic web page technical standards. JSP technology somewhat similar to ASP technology, it is in the traditional HTML web page document (*. htm, *. html) to insert the Java programming paragraph (Scriptlet) and JSP tag (tag), thus JSP documents (*. jsp). Using JSP development of the Web application is cross-platform that can run on Linux, is also available for other operating systems.JSP technology to use the Java programming language prepared by the category of XML tags and scriptlets, to produce dynamic pages package processing logic. Page also visit by tags and scriptlets exist in the services side of the resources of logic. JSP page logic and web page design and display separation, support reusable component-based design, Web-based application development is rapid and easy.Web server in the face of visits JSP page request, the first implementation of the procedures of, and then together with the results of the implementation of JSP documents in HTML code with the return to the customer. Insert the Java programming operation of the database can be re-oriented websites, in order to achieve the establishment of dynamic pages needed to function.JSP and Java Servlet, is in the implementation of the server, usually returned to the client is an HTML text, as long as the client browser will be able to visit.JSP 1.0 specification of the final version is launched in September 1999, December has introduced 1.1 specifications. At present relatively new is JSP1.2 norms, JSP2.0 norms of the draft has also been introduced.JSP pages from HTML code and Java code embedded in one of the components.The server was in the pages of client requests after the Java code and then will generate the HTML pages to return to the client browser. Java Servlet JSP is the technical foundation and large-scale Web application development needs of Java Servlet and JSP support to complete. JSP with the Java technology easy to use, fully object-oriented, and a platform-independent and secure, mainly for all the characteristics of the Internet. JSP technology strength:(1) time to prepare, run everywhere. At this point Java better than PHP, in addition to systems, the code not to make any changes.(2) the multi-platform support. Basically on all platforms of any development environment, in any environment for deployment in any environment in the expansion. Compared ASP / PHP limitations are obvious. (3) a strong scalability. From only a small Jar documents can run Servlet / JSP, to the multiple servers clustering and load balancing, to multiple Application for transaction processing, information processing, a server to numerous servers, Java shows a tremendous Vitality. (4) diversification and powerful development tools support. This is similar to the ASP, Java already have many very good development tools, and many can be free, and many of them have been able to run on a variety of platforms under. JSP technology vulnerable:(1) and the same ASP, Java is the advantage of some of its fatal problem. It is precisely because in order to cross-platform functionality, in order to extreme stretching capacity, greatly increasing the complexity of the product. (2) Java's speed is class to complete the permanent memory, so in some cases by the use of memory compared to the number of users is indeed a "minimum cost performance." On the other hand, it also needs disk space to store a series of. Java documents and. Class, as well as the corresponding versions of documents.Spring:It all started with a bean.In 1996, the Java programming language was still a young, exciting, up-and- coming platform. Many developers flocked to the language because t hey’d seen how to create rich and dynamic web applications using applets. They soon learned that there was more to this strange new language than animated juggling cartoon characters. Unlike any language before it, Java made it possible to write complex applications made up of discrete parts. They came for the applets, but they stayed for the components. In December of that year, Sun Microsystems published the JavaBeans 1.00-A spec- ification. JavaBeans defined a software component model for Java. This specification defined a set of coding policies that enabled simple Java objects to be reusable and easily composed into more complex applications. Although JavaBeans were intended as a general-purpose means of defining reusable application components they were primarily used as a model for building user interface widgets. They seemed too simple to be capable of any “real” work.Enterprise developers wanted more. Sophisticated applications often require services such as transaction support, secu-rity, and distributed computing—services not directly provided by the JavaBeans spec- ification. So in March 1998, Sun published version 1.0 of the Enterprise JavaBeans (EJB) specification. This specification extended the notion of Java components to the server side, providing much-needed enterprise services, but failed to continue the simplicity of the original JavaBeans specification. Except in name, EJB bears little resemblance to the original JavaBeans specification.Despite the fact that many successful applications have been built based on EJB, EJB never achieved its intended purpose: to simplify enterprise application develop- ment. It’s true that EJB’s declarative programming model simplifies many infrastruc-tural aspects of development, such as transactions and security. But in a different way, EJBs complicate development by mandating deployment descriptors and plumbing code (home and remote/local interfaces). Over time, many developers became disen- chanted with EJB. As a result, its popularity has waned in recent years, leaving many developers looking for an easier way.Today, Java component development has returned to its roots. New programming techniques, including aspect-oriented programming (AOP) and dependency injection (DI), are giving JavaBeans much of the power previously reserved for EJBs. These tech- niques furnish plain-old Java objects (POJOs) with a declarative programming model reminiscent of EJB, but without all of EJB’s complexity. No longer must you resort to writing an unwieldy EJB component when a simple JavaBean will suffice. In fairness, even EJBs have evolved to promote a POJO-based programming model. Employing ideas such as DI and AOP, the latest EJB specification is significantly sim- pler than its predecessors. But for many developers, this move is too little, too late. By the time the EJB 3 specification had entered the scene, other POJO-based develop- ment frameworks had already established themselves as de facto standards in the Java community..Leading the charge for lightweight POJO-based development is the Spring Frame- work。
java毕业设计中英文翻译

java毕业设计中英文翻译篇一:JAVA外文文献+翻译Java and the InternetIf Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re coming from a traditional programming perspective. Although Java is very useful for solving traditional stand-alone programming problems, it is also important because it will solve programming problems on the World Wide Web.1. Client-side programmingThe Web’s initial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HTML contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset the data on the form or “submit” the data on the form backto the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl is a common choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with it. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data mustbe sent, as well as the load on both the server and the Internet. (On top of this, starting a CGI program tends to be slow.) The initial designers of the Web didnot foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed. For example, any sort of dynamic graphing is nearly impossible to perform with consistency because a GIF file must be created and moved from the server to the client for each version of the graph. And you’ve no doubt had direct experience with something as simple as validating the data on an input form. You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; you must then back up a page and try again. Not only is this slow, it’s inelegant.The solution is client-side programming. Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page. Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience atyour Web site.The problem with discussions of client-side programming is that they aren’t very different from discussions of programming in general. The parameters are almost the same, but the platform is different: a Web browser is like a limited operating system. In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming. The rest of this section provides an overview of the issues and approaches in client-side programming.2.Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in. This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself into the appropriate spot in the browser. It tells the browser “from now on you can perform this new activity.” (You need to download the plug-in only once.) Some fast and powerful behavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t something you’d wantto do as part of the process of building a particular site. The value of the plug-in for client-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer. Thus, plug-ins provide a “back door”that allows the creation of new client-side programming languages (although not all languages are implemented as plug-ins).3.Scripting languagesPlug-ins resulted in an explosion of scripting languages. With a scripting language you embed the source code for your client-side program directly into the HTML page, and the plug-in that interprets that language is automatically activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The trade-off is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly sophisticatedthings with scripting languages so this is not too much of a hardship.This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in client-side programming. Your problems might very well fit completely within that 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming.The most commonly discussed browser scripting languages are JavaScript (which has nothing to do with Java; it’s named that way just to grab some of Java’s marketing momentum), VBScript (which looks like Visual Basic), andTcl/Tk, which comes from the popular cross-platform GUI-building language. There are others out there, and no doubt more in development.JavaScript is probably the most commonly supported. It comes built into both Netscape Navigator and the Microsoft Internet Explorer (IE). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically create pages using JavaScript. However, if you’re already fluent in Visual Basic or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing with the Web issues already.)4.JavaIf a scripting language can solve 80 percent of the client-side programming problems, what about the other 20 percent—the “really hard stuff?” The most popular solution today is Java. Not only is it a powerful programming language built to be secure, cross-platform, and international, but Java is being continually extended to provide language features and libraries that elegantly handle problems that are difficult in traditional programming languages, such as multithreading, database access, network programming, and distributed computing. Java allowsclient-side programming via the applet.An applet is a mini-program that will run only under a Web browser. The applet is downloaded automatically as part of a Web page (just as, for example, a graphic is automatically downloaded). When the applet is activated it executes a program. This is part of its beauty—it provides you with a way to automatically distribute the client software from the server at the time the user needs the client software, and no sooner. The user gets the latest version of the client software without fail and without difficult reinstallation. Because of the way Java is designed, the programmer needs to create only a single program, and that program automatically works with all computers that have browsers with built-in Java interpreters. (This safely includes the vast majority of machines.) Since Java is a full-fledged programming language, you can do as much work as possible on the client before and after making requests of theserver. For example, you won’t need to send a request form across the Internet to discover that you’ve gotten a date or some other parameter wrong, and yourclient computer can quickly do the work of plotting data instead of waiting for the server to make a plot and ship a graphic image back to you. Not only do you get the immediate win of speed and responsiveness, but the general network traffic and load on servers can be reduced, preventing the entire Internet from slowing down.One advantage a Java applet has over a scripted program is that it’s in compiled form, so the source code isn’t available to the client. On the other hand, a Java applet can be decompiled without too much trouble, but hiding your code is often not an important issue. Two other factors can be important. As you will see later in this book, a compiled Java applet can comprise many modules and take multiple server “hits” (accesses) to download. (In Java 1.1 and higher this is minimized by Java archives, called JAR files, that allow all the required modules to be packaged together and compressed for a single download.) A scripted program will just be integrated into the Web page as part of its text (and will generally be smaller and reduce server hits). This could be important to the responsiveness of your Website. Another factor is the all-important learning curve. Regardless of what you’ve heard, Java is not a trivial language to learn. If you’re a Visual Basic programmer, moving to VBScript will be your fastest solution, and since it will probably solve most typical client/server problems you might be hard pressed to justify learning Java. If you’re experienced with a scripting language you will certainly benefit from looking at JavaScript or VBScript before committing to Java, since they might fit your needs handily and you’ll be more productive sooner.to run its applets withi5.ActiveXTo some degree, the competitor to Java is Microsoft’s ActiveX, although it takes a completely different approach. ActiveX was originally a Windows-only solution, although it is now being developed via an independent consortium to become cross-platform. Effectively, ActiveX says “if your program connects to篇二:JAVA思想外文翻译毕业设计文献来源:Bruce Eckel. Thinking in Java [J]. Pearson Higher Isia Education,XX-2-20.Java编程思想 (Java和因特网)既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不是很明显。
外文翻译 Java技术及SSH框架和Jsp技术的介绍

毕业设计(论文)外文资料翻译学院:计算机工程学院专业班级:学生姓名:学号:指导教师:外文出处:(外文)/wiki/java_(programming_language)附件:1.外文资料翻译译文; 2.外文原文Java技术及SSH框架和Jsp技术的介绍Java,是一种可以撰写跨平台应用软件的面向对象的程序设计语言,由当时任职太阳微系统的詹姆斯·高斯林(James Gosling)等人于1990年代初开发。
它最初被命名为Oak,目标设置在家用电器等小型系统的编程语言,来解决诸如电视机、电话、闹钟、烤面包机等家用电器的控制和通讯问题。
由于这些智能化家电的市场需求没有预期的高,Sun放弃了该项计划。
就在Oak 几近失败之时,随着互联网的发展,Sun看到了Oak在计算机网络上的广阔应用前景,于是改造了Oak,在1995年5月以“Java”的名称正式发布了。
Java 伴随着互联网的迅猛发展而发展,逐渐成为重要的网络编程语言。
Java编程语言的风格十分接近C++语言。
继承了C++ 语言面向对象技术的核心,Java 舍弃了C++语言中容易引起错误的指针(以引用取代)、运算符重载(operator overloading)、多重继承(以接口取代)等特性,增加了垃圾回收器功能用于回收不再被引用的对象所占据的内存空间。
在Java SE 1.5版本中Java又引入了泛型编程(Generic Programming)、类型安全的枚举、不定长参数和自动装/拆箱等语言特性。
Java不同于一般的编译运行计算机语言和解释执行计算机语言。
它首先将源代码编译成字节码(bytecode),然后依赖各种不同平台上的虚拟机来解释执行字节码,从而实现了“一次编译、到处执行”的跨平台特性。
不过,这同时也在一定程度上降低了Java程序的运行效率。
但在J2SE1.4.2发布后,Java的运行速度有了大幅提升。
与传统程序不同Sun公司在推出Java之际就将其作为一种开放的技术。
Java编程思想外文翻译文献

Java编程思想外文翻译文献(文档含中英文对照即英文原文和中文翻译)原文:Thinking in JavaAlthough it is based on C++, Java is more of a “pure” object-oriented language.Both C++ and Java are hybrid languages, but in Java the designers felt that the hybridization was not as important as it was in C++. A hybrid language allows multiple programming styles; the reason C++ is hybrid is to support backward compatibility with the C language. Because C++ is a superset of the C language, it includes many of that language’s undesirable features, which can make some aspects of C++ overly complicated. The Java language assumes that you want to do only object-oriented programming. This means that before you can begin you must shift yourmindset into an object-oriented world (unless it’s already there). The benefit of this initial effort is the ability to program in a language that is simpler to learn and to use than many other OOP languages. In this chapter we’ll see the basic components of a Java program and we’ll lea rn that everything in Java is an object, even a Java program.Each programming language has its own means of manipulating data. Sometimes the programmer must be constantly aware of what type of manipulation is going on. Are you manipulating the object directly, or are you dealing with some kind of indirect representation (a pointer in C or C++) that must be treated with a special syntax?All this is simplified in Java. You treat everything as an object, using a single consistent syntax. Although you treat everything as an object, the identifier you manipulate is actually a “reference” to an object. You might imagine this scene as a television (the object) with your remote control (the reference). As long as you’re holding this reference, you have a connecti on to the television, but when someone says “change the channel” or “lower the volume,” what you’re manipulating is the reference, which in turn modifies the object. If you want to move around the room and still control the television, you take the remote/reference with you, not the television.Also, the remote control can stand on its own, with no television. That is, just because you have a reference doesn’t mean there’s necessarily an object connected to it. So if you want to hold a word or sentence, you create a String reference:But here you’ve created only the reference, not an object. If you decided to send a message to s at this point, you’ll get an error (at run time) because s isn’t actually attached to anything (there’s no television). A safer p ractice, then, is always to initialize a reference when you create it.However, this uses a special Java feature: strings can be initialized with quoted text. Normally, you must use a more general type of initialization for objectsWhen you create a reference, you want to connect it with a new object. You do so, in general, with the new keyword. The keyword new says, “Make me a new one of these objects.” So in the preceding example, you can say:Not only does this mean “Make me a new String,” but it also g ives information about how to make the String by supplying an initial character string.Of course, String is not the only type that exists. Java comes with a plethora of ready-made types. What’s more important is that you can create your own types. In fact, that’s the fundamental activity in Java programming, and it’s what you’ll be learning about in the rest of this bookIt’s useful to visualize some aspects of how things are laid out while the program is running—in particular how memory is arranged. There are six different places to store data: Registers. This is the fastest storage because it exists in a place different from that of other storage: inside the processor. However, the number of registers is severely limited, so registers are allocated by t he compiler according to its needs. You don’t have direct control, nor do you see any evidence in your programs that registers even exist.The stack. This lives in the general random-access memory (RAM) area, but has direct support from the processor via its stack pointer. The stack pointer is moved down to create new memory and moved up to release that memory. This is an extremely fast and efficient way to allocate storage, second only to registers. The Java compiler must know, while it is creating the program, the exact size and lifetime of all the data that is stored on the stack, because it must generate the code to move the stack pointer up and down. This constraint places limits on the flexibility of your programs, so while some Java storage exists on the stack—in particular, object references—Java objects themselves are not placed on the stack.The heap. This is a general-purpose pool of memory (also in the RAM area) where all Java objects live. The nice thing about the heap is that, unlike the stack, the compiler doesn’t need to know how much storage it needs to allocate from the heap or how long that storage must stay on the heap. Thus, there’s a great deal of flexibility in using storage on the heap. Whenever you need to create an object, you simply write the code to create it by using new,and the storage is allocated on the heap when that code is executed. Of course there’s a price you pay for this flexibility. It takes more time to allocate heap storage than it does to allocate stack storage (if you even could create objects on the stack in Java, as you can in C++).Static storage. “Static” is used here in the sense of “in a fixed location” (although it’s also in RAM). Static storage contains data that is available for the entire time a program is running. You can use the static keyword to specify that a particular element of an object is static, but Java objects themselves are never placed in static storage.Constant storage. Constant values are often placed directly in the program code, which is safe since they can never change. Sometimes constants are cordoned off by themselves so that they can be optionally placed in read-only memory (ROM), in embedded systems.Non-RAM storage. If data lives completely outside a program, it can exist while the program is not running, outside the control of the program. The two primary examples of this are streamed objects, in which objects are turned into streams of bytes, generally to be sent to another machine, and persistent objects, in which the objects are placed on disk so they will hold their state even when the program is terminated. The trick with these types of storage is turning theobjects into something that can exist on the other medium, and yet can be resurrected into a regular RAM-based object when necessary. Java provides support for lightweight persistence, and future versions of Java might provide more complete solutions for persistence One group of types, which you’ll use quite often in your programming, gets special treatment. You can think of these as “primitive” types. The reason for the special treatment is that to create an object with new—especially a small, simple variable—isn’t very efficient, because new places objects on the heap. For these types Java falls back on the approach taken by C and C++. That is, instead of creating the variable by using new, an “automatic” variable is created that is not a reference. The variable holds the value, and it’s placed on the stack, so it’s much more efficient.Java determines the size of each p rimitive type. These sizes don’t change from one machine architecture to another as they do in most languages. This size invariance is one reason Java programs are portableAll numeric types are signed, so don’t look for unsigned types.The size of the boolean type is not explicitly specified; it is only defined to be able to take the literal values true or false.The “wrapper” classes for the primitive data types allow you to make a nonprimitive object on the heap to represent that primitive type. For example:char c = 'x';Character C = new Character(c);Or you could also use:Character C = new Character('x');The reasons for doing this will be shown in a later chapter.Java includes two classes for performing high-precision arithmetic: Big Integer and BigDecimal. Although these approximately fit into the same category as the “wrapper” classes, neither one has a primitive analogue.Both classes have methods that provide analogues for the operations that you perform on primitive types. That is, you can do anything with a BigInteger or BigDecimal that you can with an int or float, it’s just that you must use method calls instead of operators. Also, since there’s more involved, the operations will be slower. You’re exchanging speed for accuracy. BigInteger supports arbitrary-precision integers. This means that you can accurately represent integral values of any size without losing any information during operations.BigDecimal is for arbitrary-precision fixed-point numbers; you can use these for accurate monetary calculations, for example.Consult the JDK documentation for details about the constructors and methods you can call for these two classesVirtually all programming languages support arrays. Using arrays in C and C++ is perilous because those arrays are only blocks of memory. If a program accesses the array outside of its memory block or uses the memory before initialization (common programming errors), there will be unpredictable results.One of the primary goals of Java is safety, so many of the problems that plague programmers in C and C++ are not repeated in Java. A Java array is guaranteed to be initialized and cannot be accessed outside of its range. The range checking comes at the price of having a small amount of memory overhead on each array as well as verifying the index at run time, but the assumption is that the safety and increased productivity is worth the expense.When you create an array of objects, you are really creating an array of references, and each of those references is automatically initialized to a special value with its own keyword: null. When Java sees null, it recognizes that the reference in question isn’t pointing to an object. You must assign an object to each reference before you use it, and if you try to use a reference that’s still null,the problem will be reported at run time. Thus, typical array errors are prevented in Java.You can also create an array of primitives. Again, the compiler guarantees initialization because it zeroes the memory for that array.Arrays will be covered in detail in later chapters.In most programming languages, the concept of the lifetime of a variable occupies a significant portion of the programming effort. How long does the variable last? If you are supposed to destroy it, when should you? Confusion over variable lifetimes can lead to a lot of bugs, and this section shows how Java greatly simplifies the issue by doing all the cleanup work for you.Most procedural languages have the concept of scope. This determines both the visibility and lifetime of the names defined within that scope. In C, C++, and Java, scope is determined by the placement of curly braces {}. So for example:{int x = 12;// Only x available{int q = 96;// Both x & q available}// Only x available// q “out of scope”}A variable defined within a scope is available only to the end of that scope.Any text after a ‘//’ to the end of a line is a comment.Indentation makes Java code easier to read. Since Java is a free-form language, the extra spaces, tabs, and carriage returns do not affect the resulting program.Note that you cannot do the following, even though it is legal in C and C++:{int x = 12;{int x = 96; // Illegal}}The compiler will announce that the variable x has already been defined. Thus the C and C++ ability to “hide” a variable in a larger scope is not allowed, because the Java designers thought that it led to confusing programs.Java objects do not have the same lifetimes as primitives. When you create a Java object using new, it hangs around past the end of the scope. Thus if you use:{String s = new String("a string");} // End of scopethe reference s vanishes at the end of the scope. However, the String object that s was pointing to is still occupying memory. In this bit of code, there is no way to access the object, because the only reference to it is out of scope. In later chapters you’ll see how the reference to the object can be passed around and duplicated during the course of a program.It turns out that because objects created with new stay around for as long as you want them, a whole slew ofC++ programming problems simply vanish in Java. The hardest problems seem to occur in C++ because you don’t get any help from t he language in making sure that the objects are available when they’re needed. And more important, in C++ you must make sure that you destroy the objects when you’re done with them.That brings up an interesting question. If Java leaves the objects lying around, what keeps them from filling up memory and halting your program? This is exactly the kind of problem that would occur in C++. This is where a bit of magic happens. Java has a garbage collector, which looks at all the objects that were created with new and figures out which ones are not being referenced anymore. Then it releases the memory for those objects, so the memory can be used for new objects. This means that you never need to worry about reclaiming memory yourself. You simply create objects, and when you no longer need them, they will go away by themselves. This eliminates a certain class of programming problem: the so-called “memory leak,” in which a programmer forgets to release memory.If everything is an object, what determines how a particular class of object looks and behaves?Put another way, what establishes the type of an object? You might expect there to be a keyword called “type,” and that certainly would have made sense. Historically, however, most object-oriented languages have used the keyword class to mean “I’m about to tell you what a new type of object looks like.” The class keyword (which is so common that it will not be bold-faced throughout this book) is followed by the name of the new type. For example:class ATypeName { /* Class body goes here */ }This introduces a new type, although the class body consists only of a comment (the stars and slashes and what is inside, which will be discussed later in this chapter), so there is not too much that you can do with it. However, you can create an object of this type using new: ATypeName a = new ATypeName();But you cannot tell it to do much of anything (that is, you cannot send it any interesting messages) until you define some methods for it.When you define a class (and all you do in Java is define classes, make objects of those classes, and send messages to those objects), you can put two types of elements in your class: fields (sometimes called data members), and methods (sometimes called member functions). A field is an object of any type that you can communicate with via its reference. It can also be one of the primitive types (which isn’t a reference). If it is a reference to an object, you must initialize that reference to connect it to an actual object (using new, as seen earlier) in a special method called a constructor (described fully in Chapter 4).If it is a primitive type, you can initialize it directly at the point of definition in the class. (As you’ll see later, references can also be initialized at the poi nt of definition.) Each object keeps its own storage for its fields; the fields are not shared among objects. Here is an example of a class with some fields:class DataOnly {int i;float f;boolean b;}This class doesn’t do anything, but you can create an object:DataOnly d = new DataOnly();You can assign values to the fields, but you must first know how to refer to a member ofan object. This is accomplished by stating the name of the object reference, followed by a period (dot), followed by the name of the member inside the object:objectReference.memberFor example:d.i = 47;d.f = 1.1f; // ‘f’ after number indicates float constantd.b = false;It is also possible that your object might contain other objects that contain data you’d like to modify. For this, you just keep “connecting the dots.” For example:myPlane.leftTank.capacity = 100;The DataOnly class cannot do much of anything except hold data, because it has no methods. To understand how those work, you must first understand arguments and return values, which will be described shortly.译文:Java编程思想“尽管以C++为基础,但Java是一种更纯粹的面向对象程序设计语言”。
毕业设计(论文)外文资料翻译(学生用)

毕业设计外文资料翻译学院:信息科学与工程学院专业:软件工程姓名: XXXXX学号: XXXXXXXXX外文出处: Think In Java (用外文写)附件: 1.外文资料翻译译文;2.外文原文。
附件1:外文资料翻译译文网络编程历史上的网络编程都倾向于困难、复杂,而且极易出错。
程序员必须掌握与网络有关的大量细节,有时甚至要对硬件有深刻的认识。
一般地,我们需要理解连网协议中不同的“层”(Layer)。
而且对于每个连网库,一般都包含了数量众多的函数,分别涉及信息块的连接、打包和拆包;这些块的来回运输;以及握手等等。
这是一项令人痛苦的工作。
但是,连网本身的概念并不是很难。
我们想获得位于其他地方某台机器上的信息,并把它们移到这儿;或者相反。
这与读写文件非常相似,只是文件存在于远程机器上,而且远程机器有权决定如何处理我们请求或者发送的数据。
Java最出色的一个地方就是它的“无痛苦连网”概念。
有关连网的基层细节已被尽可能地提取出去,并隐藏在JVM以及Java的本机安装系统里进行控制。
我们使用的编程模型是一个文件的模型;事实上,网络连接(一个“套接字”)已被封装到系统对象里,所以可象对其他数据流那样采用同样的方法调用。
除此以外,在我们处理另一个连网问题——同时控制多个网络连接——的时候,Java内建的多线程机制也是十分方便的。
本章将用一系列易懂的例子解释Java的连网支持。
15.1 机器的标识当然,为了分辨来自别处的一台机器,以及为了保证自己连接的是希望的那台机器,必须有一种机制能独一无二地标识出网络内的每台机器。
早期网络只解决了如何在本地网络环境中为机器提供唯一的名字。
但Java面向的是整个因特网,这要求用一种机制对来自世界各地的机器进行标识。
为达到这个目的,我们采用了IP(互联网地址)的概念。
IP以两种形式存在着:(1) 大家最熟悉的DNS(域名服务)形式。
我自己的域名是。
所以假定我在自己的域内有一台名为Opus的计算机,它的域名就可以是。
thinkinjava 英文版

thinkinjava 英文版Title: Think in Java - An In-depth ReviewIntroduction:Think in Java is a renowned book written by Bruce Eckel, which serves as a comprehensive guide for programmers to learn the Java programming language. In this article, we will delve into the various aspects covered in the book, providing a detailed overview of its content and its significance in the world of Java programming.Content:1. Fundamentals of Java Programming:1.1 Object-Oriented Programming (OOP) Concepts:- Explanation of classes, objects, and inheritance.- Detailed overview of encapsulation, polymorphism, and abstraction.- Understanding the importance of interfaces and their implementation.1.2 Language Syntax and Control Structures:- Comprehensive coverage of Java syntax and keywords.- Explanation of control structures such as loops and conditional statements.- In-depth exploration of exception handling and error management.1.3 Data Types and Variables:- Explanation of primitive data types and their usage.- Detailed overview of reference types and their significance.- Understanding variable declaration, initialization, and scope.2. Object-Oriented Programming in Java:2.1 Classes and Objects:- Detailed explanation of class structure and object creation.- In-depth exploration of constructors and their role in object initialization.- Understanding the usage and implementation of methods in Java.2.2 Inheritance and Polymorphism:- Explanation of inheritance hierarchy and its benefits.- Detailed overview of method overriding and dynamic method dispatch.- Understanding the concept of polymorphism and its practical applications.2.3 Interfaces and Abstract Classes:- Comprehensive coverage of interfaces and their role in achieving multiple inheritances.- Detailed explanation of abstract classes and their usage.- Understanding the differences between interfaces and abstract classes.3. Exception Handling and Error Management:3.1 Exception Types and Handling Mechanisms:- Explanation of checked and unchecked exceptions.- In-depth exploration of try-catch-finally blocks.- Understanding the usage of throw and throws keywords.3.2 Custom Exception Classes:- Detailed explanation of creating custom exception classes.- Understanding the importance of exception chaining and exception propagation. - In-depth exploration of exception handling best practices.3.3 Error Management and Resource Handling:- Comprehensive coverage of error management techniques.- Explanation of resource handling using try-with-resources.- Understanding the significance of finally block in resource management.4. Java Collections Framework:4.1 Overview of Collection Interfaces and Classes:- Detailed explanation of List, Set, and Map interfaces.- In-depth exploration of ArrayList, LinkedList, HashSet, and HashMap.- Understanding the usage and benefits of each data structure.4.2 Iteration and Manipulation of Collections:- Explanation of iteration techniques using iterators and enhanced for loop.- Detailed overview of sorting and searching algorithms.- Understanding the usage of Java 8 streams for collection manipulation.4.3 Generics and Type-Safe Collections:- Comprehensive coverage of generics and their benefits.- Explanation of type parameters and bounded types.- Understanding the usage of generic collections for type safety.5. Concurrency and Multithreading:5.1 Introduction to Concurrency:- Detailed explanation of threads and their lifecycle.- In-depth exploration of thread synchronization and locks.- Understanding the usage of volatile and atomic variables.5.2 Thread Communication and Coordination:- Explanation of inter-thread communication using wait and notify.- Detailed overview of thread coordination using join and sleep.- Understanding the usage of thread pools and executors.5.3 Concurrency Utilities:- Comprehensive coverage of concurrent collections and their benefits.- Explanation of thread-safe data structures and their usage.- Understanding the usage of locks, conditions, and semaphores.Conclusion:Think in Java provides an in-depth understanding of the Java programming language, covering fundamental concepts, object-oriented programming, exception handling, collections framework, and concurrency. By delving into the book's content, programmers can enhance their Java skills and develop robust and efficient applications. Whether you are a beginner or an experienced developer, Think in Java serves as a valuable resource for mastering the Java programming language.。
Java编程思想(Java和因特网)毕业论文外文文献翻译及原文

毕业设计(论文)外文文献翻译文献、资料中文题目:Java编程思想 (Java和因特网)文献、资料英文题目:Thingking in Java(Java and the Internet)文献、资料来源:文献、资料发表(出版)日期:院(部):专业:班级:姓名:学号:指导教师:翻译日期: 2017.02.14文献来源:Bruce Eckel.Thinking in Java [J]. Pearson Higher Isia Education,2006-2-20.Java编程思想 (Java和因特网)既然Java不过另一种类型的程序设计语言,大家可能会奇怪它为什么值得如此重视,为什么还有这么多的人认为它是计算机程序设计的一个里程碑呢?如果您来自一个传统的程序设计背景,那么答案在刚开始的时候并不是很明显。
Java除了可解决传统的程序设计问题以外,还能解决World Wide Web(万维网)上的编程问题。
1、客户端编程Web最初采用的“服务器-浏览器”方案可提供交互式内容,但这种交互能力完全由服务器提供,为服务器和因特网带来了不小的负担。
服务器一般为客户浏览器产生静态网页,由后者简单地解释并显示出来。
基本HTML语言提供了简单的数据收集机制:文字输入框、复选框、单选钮、列表以及下拉列表等,另外还有一个按钮,只能由程序规定重新设置表单中的数据,以便回传给服务器。
用户提交的信息通过所有Web服务器均能支持的“通用网关接口”(CGI)回传到服务器。
包含在提交数据中的文字指示CGI该如何操作。
最常见的行动是运行位于服务器的一个程序。
那个程序一般保存在一个名为“cgi-bin”的目录中(按下Web页内的一个按钮时,请注意一下浏览器顶部的地址窗,经常都能发现“cgi-bin”的字样)。
大多数语言都可用来编制这些程序,但其中最常见的是Perl。
这是由于Perl是专为文字的处理及解释而设计的,所以能在任何服务器上安装和使用,无论采用的处理器或操作系统是什么。
英文thinking in java pdf

英文thinking in java pdf全文共6篇示例,供读者参考篇1Thinking in Java: A Friendly Guide for Young MindsHello, young coders! Are you ready to embark on an exciting adventure into the world of Java programming? If you've ever dreamed of creating your own games, apps, or even robots, then "Thinking in Java" is the perfect book for you!Imagine you're a brave explorer, setting out to conquer the vast lands of coding. Just like any great expedition, you need to prepare yourself with the right tools and knowledge. That's where "Thinking in Java" comes in – it's your trusty map and compass on this incredible journey.Now, you might be wondering, "What's so special about Java?" Well, let me tell you a secret: Java is like a universal language that computers from all around the world can understand. It's like having a magical translator that helps you communicate with machines and make them do amazing things!The author of "Thinking in Java," Bruce Eckel, is a coding wizard who has mastered the art of explaining complex concepts in a way that even kids like you can understand. He's like a friendly tour guide, leading you through the enchanting realms of Java, one step at a time.As you flip through the pages of this book, you'll discover a world full of fascinating creatures called "objects." These objects are like little helpers that work together to make your programs come to life. You'll learn how to create them, how to give them instructions, and how to make them interact with each other in wonderful ways.But wait, there's more! "Thinking in Java" also teaches you about the powerful spells called "control structures" that allow you to control the flow of your programs. You'll be able to make decisions, repeat actions, and even handle unexpected situations, just like a seasoned adventurer navigating through treacherous terrain.And if that's not enough, this book also covers the mystical art of "object-oriented programming," which is like having a secret weapon in your coding arsenal. You'll learn how to organize your code in a way that makes it easier to understand, modify, and reuse, just like a wizard organizing their spellbooks.hard! How will I ever learn all of this?" Well, my dear friends, "Thinking in Java" has got you covered. With its engaging examples, fun exercises, and easy-to-follow explanations, you'll be coding like a pro in no time!Imagine the thrill of creating your very own video game, where you can explore magical worlds and battle fierce dragons. Or maybe you'd like to build a robot that can help you with your chores (who doesn't love that idea?). With Java and "Thinking in Java" by your side, the possibilities are endless!So, what are you waiting for? Grab your copy of "Thinking in Java" and let the adventure begin! Who knows, you might just become the next coding legend, creating amazing programs that change the world. Happy coding, young explorers!篇2Thinking in Java - The Fun Way to Learn Coding!Hey there, kids! Have you ever wondered how those cool video games or fun apps on your parents' phones work? Well, the secret lies in something called "coding" or "programming." And one of the best ways to learn coding is through a language called Java. Sounds pretty neat, right?grown-ups and super smart people!" Well, let me tell you a secret – anyone can learn to code, even you! And the best part? There's a super awesome book called "Thinking in Java" that can teach you all about it in a fun and easy way.Imagine being able to create your own games, apps, or even robots! With Java, the possibilities are endless. And the "Thinking in Java" book is like your personal guide on this exciting journey.So, what's so special about this book? Well, first of all, it's written in a really simple and easy-to-understand language. You know how sometimes grown-ups use big, complicated words that make your head spin? Not this book! It talks to you like a friend, explaining everything step-by-step, just like your favorite teacher at school.But that's not all! The book is also filled with lots of cool examples and exercises that make learning Java feel like playing a game. You'll get to solve puzzles, create little programs, and even make things move on the screen. How cool is that?One of the best things about "Thinking in Java" is that it doesn't just teach you how to write code – it also helps you understand why things work the way they do. It's like learning anew language, but instead of just memorizing words, you'll learn how to put them together to create something amazing.And you know what else is great? The book comes in a PDF format, which means you can read it on your parents' computer, tablet, or even their phone! No need to carry around a heavy book or worry about losing your place.Now, I know what you're thinking, "But coding sounds really hard!" And you're right, it can be challenging sometimes. But the "Thinking in Java" book makes it so much fun that you'll hardly even notice how much you're learning. It's like playing a video game, but instead of just watching, you're the one creating the action!So, what do you say? Are you ready to embark on this exciting coding adventure? With the "Thinking in Java" book by your side, you'll be building your own apps and games in no time! Just imagine the look on your friends' faces when you show them what you've created. They'll be so impressed!And who knows, maybe one day you'll grow up to be a famous programmer, creating the next big thing that everyone's talking about. But for now, just focus on having fun and learning something new and amazing.Remember, coding is like a superpower – and with the "Thinking in Java" book, you'll be well on your way to becoming a coding superhero!篇3Thinking in Java - A Kid's GuideHey kids! Have you ever wondered how those cool apps and games on your tablets and phones work? The secret is programming languages like Java! Java is a super awesome language that helps make all sorts of fun stuff happen on computers and devices.Learning Java is kind of like learning a new language to speak with computers and tell them what to do. Pretty neat, right? Instead of words though, Java uses things called "code" made up of keywords, symbols, and other funny looking stuff. Don't worry, it starts to make sense once you get the hang of it!One of the most important concepts in Java is something called "object-oriented programming" or OOP for short. OOP is all about creating "objects" which are kind of like things or篇4Thinking in Java - A Fun Book for Brainy Kids!Hey kids! Have you ever wanted to learn how to talk to computers and make them do cool things? Well, there's a really awesome book called "Thinking in Java" that can teach you all about it. Java is like a special language that computers understand, and once you learn it, you'll be able to create your own games, apps, and all sorts of crazy stuff!This book is kind of like a huge instruction manual that shows you step-by-step how to use Java to give commands to computers. It's written by these super smart guys named Bruce Eckel and Chuck Allison, who are total experts when it comes to Java.Now, I know what you're thinking - "But books are so boring!" Trust me, this one is different. "Thinking in Java" makes learning Java really fun and easy to understand, even for kids. It uses simple words and lots of examples to explain everything clearly.One of the coolest things about the book is that it doesn't just bombard you with a bunch of rules and codes to memorize. Instead, it teaches you to actually THINK like a Java programmer. That means you'll learn how to break big problems down into smaller steps, look at things from different angles, and come upwith creative solutions. It's like giving your brain a mega workout!The book starts off easy by teaching you the basic building blocks of Java, like variables, loops, and all that good stuff. But as you keep reading, it gets more and more advanced. Pretty soon, you'll be creating your own classes, objects, and even designing your very own programs from scratch. How awesome is that?But here's the best part - "Thinking in Java" is available as a free PDF online! That means you can read it on your computer, tablet, or even your phone whenever you want. No need to lug around a heavy book or beg your parents for money.So what are you waiting for? Head over to your favorite search engine, type in "Thinking in Java PDF," and get ready to dive into the awesome world of programming. Just remember to take breaks, drink lots of milk (for strong coding bones), and have fun!篇5Thinking in Java PDF: A Kid's GuideHey kids! Have you ever wanted to learn how to code like the cool programmers you see in movies and TV shows? Well,get ready because we're about to dive into the wild world of Java programming!Java is a super awesome programming language that helps computers understand what we want them to do. It's like a special language that only computers can truly grasp, kind of like how only kids understand the secret language of fart jokes.One of the best ways to learn Java is by reading the "Thinking in Java PDF." It's an online book that teaches you all about Java in a really fun and easy-to-understand way. Trust me, it's way better than those boring textbooks we have to read in school.The "Thinking in Java PDF" is like having your own personal Java tutor, but without the annoying grown-up lectures. It's packed with examples, exercises, and even a few silly jokes that'll have you giggling like a hyena.One of the coolest things about Java is that it's used to create all sorts of amazing stuff, like video games, apps, and even websites. Can you imagine being the kid who created the next Fortnite or Roblox? Talk about bragging rights on the playground!But learning Java isn't just about making cool stuff (although that's a huge part of it). It also teaches you how to think like a programmer. You'll learn how to break down complex problems into smaller, more manageable pieces, and then solve them step-by-step using code. It's like having a secret superpower for your brain!Now, I know what you're thinking: "But coding sounds so hard and boring!" Trust me, I thought the same thing at first. But once you start working through the "Thinking in Java PDF," you'll realize that it's not as scary as it seems. In fact, it's downright fun!The book starts with the basics, like learning how to write your first lines of code and understanding what all those weird symbols and words mean. But before you know it, you'll be creating your own programs and feeling like a total coding rockstar.One of the best parts of the "Thinking in Java PDF" is that it's interactive. You'll get to try out the code examples right in your web browser, which means you can see your code come to life in real-time. It's like having your own personal coding playground!And if you ever get stuck or confused (which is totally normal, by the way), the book has tons of helpful examples andexplanations to guide you through. It's like having a built-in tutor who never gets frustrated or bored with your questions.Speaking of questions, the "Thinking in Java PDF" also has a bunch of exercises and challenges for you to tackle. These are like the coding equivalent of brain teasers, and they'll really put your problem-solving skills to the test. But don't worry, the solutions are provided too, so you can check your work and see where you went wrong (or right!).Now, I know what you're thinking: "But what if I'm not a math whiz or a computer genius?" That's the beauty of the "Thinking in Java PDF" – it's designed for kids just like you, with no prior coding experience required. All you need is a willingness to learn and a little bit of patience (and maybe a few snacks for brain fuel).So, what are you waiting for? Dive into the "Thinking in Java PDF" and get ready to unlock a whole new world of coding awesomeness! Who knows, you might just be the next big thing in the tech world. Or at the very least, you'll have a cool new skill to impress your friends and family.Happy coding, kids!篇6Thinking in Java - A Beginner's GuideHey kids! Have you ever wondered how those awesome video games, apps, and websites you love were made? The answer lies in a magical language called Java! Just like how you use words to communicate with your friends and family, programmers use Java to talk to computers and make them do amazing things.Java is a special kind of language that computers can understand. It's like a secret code that tells the computer what to do, step by step. Imagine you want to make a game where a cute little character jumps over obstacles. With Java, you can give the computer instructions like "Make the character move to the right when I press the right arrow key" or "Make the character jump when I press the spacebar."But before we dive into the world of Java, let's talk about something called an "object." An object is like a real-world thing that you can see or touch, like a ball, a car, or even yourself! In Java, we can create objects that represent things in our programs. For example, we could create an object called "Player" that represents the character in our game.Now, objects can have different properties and abilities. For instance, our "Player" object might have properties like "color,""size," and "speed." It might also have abilities like "jump," "run," and "shoot." These abilities are called "methods," and they're like the special moves or actions that our object can perform.To make our game, we would use Java to create objects like the "Player," "Obstacle," and "Background." Then, we would give each object its own properties and methods, and make them interact with each other. It's like directing a play, but instead of actors, we're controlling objects in our program!One of the coolest things about Java is that it's an "object-oriented" language. This means that everything in Java is treated as an object. Even the most basic things, like numbers and text, are objects with their own properties and methods. This makes it easier for us to organize and manage our code, just like how you might organize your toys or books at home.But wait, there's more! Java also has something called "classes." A class is like a blueprint or a recipe for creating objects. It tells Java what properties and methods an object should have. For example, we might have a "Player" class that defines what a "Player" object looks like and what it can do. Then, we can use that class to create as many "Player" objects as we want in our game!Learning Java might seem a bit tricky at first, but don't worry – it's all about practice and having fun! Imagine being able to create your own games, apps, or even websites. With Java, the possibilities are endless!So, what are you waiting for? Grab your favorite snack, fire up your computer, and get ready to embark on an exciting journey into the world of Java programming!。
计算机专业英语课文的翻译 中文 (5)[5页]
![计算机专业英语课文的翻译 中文 (5)[5页]](https://img.taocdn.com/s3/m/5a8a3b7d26284b73f242336c1eb91a37f11132f2.png)
第5单元程序开发和编程语言第一部分听力和对话对话:认识Java运行时环境(JRE)和Java虚拟机(JVM)(在Java编程的第一课之前,Mark下载了一个简单的Java小应用程序进行示例学习,但他发现,它无法正常运行。
)Mark:对不起,Henry和Sophie。
你们能帮助我吗?Henry:当然可以。
什么问题?Mark:为什么这个Java小应用程序不能运行?它的源代码是正确的。
Sophie:你的计算机是否安装了Java运行环境[1]?Mark:还没有。
什么是Java运行环境?Henry:简称JRE,是一个由太阳微系统公司开发的软件平台,可以让计算机运行由Java 编程语言编写的Java小应用程序和应用程序。
[2]Sophie:它包含Java虚拟机、Java库和一些其他组件。
Mark:Java虚拟机是做什么用的?Sophie: Java虚拟机(简称JVM)是一套计算机软件程序和数据结构,它使用虚拟机模型来执行其他计算机程序和脚本。
它可以隐藏能够运行程序的计算机硬件的细节。
[3]Mark:JVM和JRE是什么关系?[4]Henry:JVM是JRE的实例,当执行Java程序时开始起作用。
当执行完成后,这个实例具有垃圾回收机制。
JVM与一套能够实现Java API(Application Program Interface,应用程序接口)的标准类库一起发行。
虚拟机和API必须彼此一致,因此它们被捆绑成为JRE.[5]Sophie:因此,这可以被视为一个虚拟的计算机,其中虚拟机是处理器,并且API是用户界面。
Henry: JVM是Java平台一个至关重要的组件。
使用所有平台的相同字节码可将Java描述成“编译一次,到处运行”Mark: 字节码?Henry:是的。
JVM在通常称为Java字节码的一种中间语言上运行,这种中间语言通常是由Java源代码产生的,但也不一定。
打算在JVM上运行的程序,必须编译成这种标准化的可移植的二进制格式。
Thinking In Java

《Thinking In Java》中文版--免费电子书,仅供网上参考,不得私自出版!作者:Bruce Eckel主页:编译:Trans Bot主页:/~transbot致谢--献给那些直到现在仍在孜孜不倦创造下一代计算机语言的人们!英文版主页 | 中文版主页 | 详细目录 | 关于译者指导您利用万维网的语言进行面向对象的程序设计完整的正文、更新内容及程序代码可从下载从Java的基本语法到它最高级的特性(网络编程、高级面向对象能力、多线程),《Thinking In Java》都能对您有所裨益。
Bruce Eckel优美的行文以及短小、精悍的程序示例有助于您理解含义模糊的概念。
面向初学者和某种程度的专家教授Java语言,而不是与平台有关的理论覆盖Java 1.2的大多数重要方面:Swing和新集合系统讲述Java的高级理论:网络编程、多线程处理、虚拟机性能以及同非Java 代码的连接320个有用的Java程序,15000行以上代码解释面向对象基本理论,从继承到设计方案来自与众不同的获奖作者Bruce Eckel可通过万维网免费索取源码和持续更新的本书电子版从获得配套CD(含15小时以上的合成语音授课)读者如是说:“最好的Java参考书……绝对让人震惊”;“购买Java参考书最明智的选择”;“我见过的最棒的编程指南”。
Bruce Eckel也是《Thinking in C++》的作者,该书曾获1995年SoftwareDevelopment Jolt Award最佳书籍大奖。
作为一名有20经验的编程专家,曾教授过世界上许多地区的人进行对象编程。
最开始涉及的领域是C++,现在也进军Java。
他是C++标准协会有表决权的成员之一,曾就面向对象程序设计这一主题写过其他5本书,发表过150多篇文章,并是多家计算机杂志的专栏作家,其中包括《Web Techniques》的Java专栏。
曾出席过C++和Java的“软件开发者会议”,并分获“应用物理”与“计算机工程”的学士和硕士学位。
电子商务毕业论文外文翻译范文《Thinking In Java》

电子商务毕业论文外文翻译范文《Thinking In Java》Thinking In JavaThe basic philosophy of Java is that “badly formed code will not be run.”The ideal time to catch an error is at compile time, before you even try to run the program. However, not all errors can be detected at compile time. The rest of the problems must be handled at run time through some formality that allows the originator of the error to pass appropriate information to a recipient who will know how to handle the difficulty properly.C and other earlier languages often had multiple error-handling schemes, and these were generally established by convention and not as part of the programming language. Typically, you returned a special value or set a flag, and the recipient was supposed to look at the value or the flag and determine that something was amiss. However, as the years passed, it was discovered that programmers who use a library tend to think of themselves as invincible—as in,“Yes, errors might happen to others, but not in my code.” So, not toosurprisingly, they wouldn’t check for the error conditions (and sometimes the error conditions were too silly to check for). If you were thorough enough to check for an error every time you called a method, your code could turn into an unreadable nightmare. Because programmerscould still coax systems out of these languages, they were resistant to admitting the truth: that this approach to handling errors was a major limitation to creating large, robust, maintainable programs.The solution is to take the casual nature out of error handling and to enforce formality. This actually has a long history, because implementations of exception handling go back to operating systems in the 1960s, and even to BASIC’s “on error goto.” But C++ exception handling was bas ed on Ada, and Java’s is based primarily on C++ (although it looks more like that in Object Pascal).The word “exception” is meant in the sense of “I take exceptionto that.” At the point where the problem occurs, you might not know what to do with it, bu t you do know that you can’t just continue on merrily; you must stop, and somebody, somewhere, must figure out what to do. But you don’t have enough information in the current context to fix the problem. So you hand the problem out to a higher context where someone is qualified to make the proper decision (much like a chain of command).The other rather significant benefit of exceptions is that theyclean up1error handling code. Instead of checking for a particular error and dealing with it at multiple places in your program, you no longer need to check at the point of the method call (since the exception will guarantee that someone catches it). And, you need to handle the problemin only one place, the so-called exception handler. This saves you code, and it separates the code that describes what you want to do from the code that is executed when things go awry. In general, reading, writing, and debugging code becomes much clearer with exceptions than when using the old way of error handling.Because exception handling is the only official way that Javareports errors, and it is enforced by the Java compiler, there are only so many examples that can be written in this book without learning about exception handling. This chapter introduces you to the code you need to write to properly handle exceptions, and the way you can generate your own exceptions if one of your methods gets into trouble.1. Basic exceptionsAn exceptional condition is a problem that prevents the continuation of the method or scope that you’re in. It’s important to distinguish an exceptional condition from a normal problem, in which you have enough information in the current context to somehow cope with the difficulty. With an exceptional condition, you cannot continue processing because you don’t have theinformation necessary to deal with the problem in the current context. All you can do is jump out of the current context and relegate that problem to a higher context. This is what happens when you throw an exception.Division is a simple example. If you’re about to divide by zero,it’s worth checking for that condition. But what does it mean that thedenominator is zero? Maybe you know, in the context of the problemyou’re trying to solve in thatparticular method, how to deal wi th a zero denominator. But if it’s an unexpected value, you can’t deal with it and so must throw an exception rather than continuing along that execution path.When you throw an exception, several things happen. First, the exception object is created in the same way that any Java object is created: on the heap, with new. Then the current path of execution (the one you couldn’t continue) is stopped and the reference for the exception object is ejected from the current context. At this point the exception handling mechanism takes over and begins to look for an appropriate place to continue executing the program. This2appropriate place is the exception handler, whose job is to recover from the problem so the program can either try another tack or just continue.As a simple example of throwing an exception, consider an object reference called t. It’s possible that you might be passed a reference that hasn’t been initialized, so you might want to check before trying to call a method using that object reference. You can send information about the error into a larger context by creating an object representing your information and “throwing” it out of your current context. This is called throwing an exception.1.1 Exception argumentsLike any object in Java, you always create exceptions on the heap using new, which allocates storage and calls a constructor. There are two constructors in all standard exceptions; The first is the default constructor, and the second takes a string argument so you can place pertinent information in the exception:throw new NullPointerException("t = null");This string can later be extracted using various methods, as you’ll see.The keyword throw causes a number of relatively magical things to happen. Typically, you’ll first use n ew to create an object that represents the error condition. You give the resulting reference to throw. The object is, in effect, “returned” from the method, even though that object type isn’t normally what the method is designed to return. A simplistic way to think about exception handling is as a different kind of return mechanism, although you get into trouble if you take that analogy too far. You can also exit from ordinary scopes by throwing an exception. But a value is returned, and the method or scope exits.Any similarity to an ordinary return from a method ends here, because where you return is someplace completely different from where you return for a normal method call. (You end up in an appropriate exception handler that might be far—many levels away on the call stack—from where the exception was thrown.)In addition, you can throw any type of Throwable (the exception root class) object that you want. Typically, you’ll throw a different class of exception for each different type of error. The information about the error is represented both inside the exception object and implicitly in the name of the exception class, so someone in the bigger context can figure out what to do with your exception. (Often, the only information is the type of exception, and nothing meaningful is stored within the exception object.)2.Catching an exception3If a method throws an exception, it must assume that exception will be “caught” and dealt with. One of the advantages of exception handling is that it allows you to concentrate on the problem you’re trying to solve in one place, and then deal with the errors from that code in another place.To see how an exception is caught, you must first understand the concept of a guarded region. This is a section of code that might produce exceptions and is followed by the code to handle those exceptions.2.1 The try blockIf you’re inside a method and you throw an exception (or another method you call within this method throws an exception), that methodwill exit in the pro cess of throwing. If you don’t want a throw to exit the method, you can setup a special block within that method to capture the exception. This is called the try block because you “try” your various method calls there. The try blockis an ordinary scope preceded by the keyword try:try {// Code that might generate exceptions}If you were checking for errors carefully in a programming language that didn’t support exception handling, you’d have to surround every method call with setup and error testing code, even if you call the same method several times. With exception handling, you put everything in a try block and capture all the exceptions in one place. This means your code is much easier to write and read because the goal of the code is not confused with the error checking.2.2 Exception handlersOf course, the thrown exception must end up someplace. This“place” is the exception handler, and there’s one for every exception type you want to catch. Exception handlers immediately follow the try block and are denoted by the keyword catch:try {// Code that might generate exceptions} catch(Type1 id1) {// Handle exceptions of Type1} catch(Type2 id2) {// Handle exceptions of Type2} catch(Type3 id3) {4// Handle exceptions of Type3}// etc...Each catch clause (exception handler) is like a little method that takes one and only one argument of a particular type. The identifier(id1, id2, and so on) can be used inside the handler, just like a method argument. Sometimes you never use the identifier because the type of the exception gives you enough information to deal with the exception, but the identifier must still be there.The handlers must appear directly after the try block. If an exception is thrown, the exception handling mechanism goes hunting for the first handler with an argument that matches the type of the exception. Then it enters that catch clause, and the exception is considered handled. The search for handlers stops once the catch clause is finished. Only the matching cat ch clause executes; it’s not like a switch statement in which you need a break after each case to prevent the remaining ones from executing.Note that within the try block, a number of different method calls might generate the same exception, but you need only one handler.1.Termination vs. resumptionThere are two basic models in exception handling theory. In termination (which is what Java and C++ support), you assume that the error is so critical that there’s no way to get back to where the exception occurred. Whoever threw the exception decided that there was no way to salvage the situation, and they don’t want to come back.The alternative is called resumption. It means that the exception handler is expected to do something to rectify the situation, and then the faulting method is retried, presuming success the second time. If you want resumption, it means you still hope to continue execution after the exception is handled. In this case, your exception is more like a method call—which is how you should setup situations in Java in which you want resumption-like behavior. (That is, don’t throw an exception; call a method that fixes the problem.) Alternatively, place your try block inside a while loop that keeps reentering the try block until the result is satisfactory.Historically, programmers using operating systems that supported resumptive exception handling eventually ended up using termination-like code and skipping5resumption. So although resumption sounds attractive at first, it isn’t quit e so useful in practice. The dominant reason is probably the coupling that results;your handler must often be aware of where the exception is thrown, and contain nongeneric code specific to the throwing location. Thismakes the code difficult to write and maintain, especially for large systems where the exception can be generated from many points.6Java的思考Java的基本原理就是“形式错误的代码不会运行”。
【IT专家】Thinking in java第四版

本文由我司收集整编,推荐下载,如有疑问,请与我司联系Thinking in java第四版2013/04/08 0 Java两大核心机制: Java虚拟机(Java Virtual Machine):JVM是一个虚拟的计算机,具有指令集并使用不同的存储区域。
负责执行指令,管理数据、内存、寄存器。
Java虚拟机机制屏蔽了底层运行平台的差别,实现了“一次编译,到处运行”。
垃圾收集机制(Garbage Collection): 垃圾回收:将不再使用的内存空间进行回收。
在C/C 等语言中,由程序员负责回收无用内存。
Java 不需要程序员负责回收无用的内存:它提供一种系统级线程跟踪存储空间的分配情况。
并在JVM空闲时,检查并释放那些可被释放的存储空间。
垃圾回收在Java 程序运行过程中自动进行,程序员无法精确控制和干预。
一个Java 源文件中最多只能有一个public 类。
其它类的个数不限,如果源文件文件包含一个public 类,它必须是该类名命名。
Java是强类型语言,每个变量必须先声明类型,后使用。
变量的作用域:一对{ }之间有效 Java 的浮点型常量默认为double 型,声明float 型常量,须后加‘f’或‘F’。
在Java中不可以写成3 x 6,应该写成x 3 x 6 。
还是python简洁啊。
:-) //: Property.java import java.util.*; /** The first Thinking in Java example program. * Lists system information on current machine. * @author Bruce Eckel * @author BruceEckel * @version 1.0 */ public class Property { /** Sole entry point to class application * @param args array of string arguments * @return No return value * @exception exceptions No exceptions thrown */ public static void main(String[] args) { System.out.println(new Date()); Properties p = System.getProperties(); p.list(System.out); System.out.println( --- Memory Usage: Runtime rt = Runtime.getRuntime(); System.out.println( Total Memory = + rt.totalMemory() +。
Java 和Internet 计算机专业毕业设计外文翻译

Java and the InternetIf Java is, in fact, yet another computer programming language, you may question why it is so important and why it is being promoted as a revolutionary step in computer programming. The answer isn’t immediately obvious if you’re comin g from a traditional programming perspective. Although Java is very useful for solving traditional standalone programming problems, it is also important because it will solve programming problems on the World Wide Web.What is the Web?The Web can seem a bit of a mystery at first, with all this talk of “surfing,” “presence,” and “home pages.” It’s helpful to step back and see what it really is, but to do this you must understand client/server systems, another aspect of computing that’s full of confusing iss ues. Client/Server computingThe primary idea of a client/server system is that you have a central repository of information—some kind of data, often in a database—that you want to distribute on demand to some set of people or machines. A key to the client/server concept is that the repository of information is centrally located so that it can be changed and so that those changes will propagate out to the information consumers. Taken together, the information repository, the software that distributes the information and the machine where the information and software reside is called the server. The software that resides on the remote machine, communicates with the server, fetches the information, processes it, and then displays it on the remote machine is called the client.The basic concept of client/server computing, then, is not so complicated. The problems arise because you have a single server trying to serve many clients at once. Generally, a database management system is involved, so the designer “balances” the layout of data into tables for optimal use. In addition, systems often allow a client to insert new information into a server. This means you must ensure that one client’s new data doesn’t walk over another client’s new data, or that data isn’t l ost in the process of adding it to the database (this is called transaction processing). As client software changes, it must be built, debugged, and installed on the client machines, which turns out to be more complicated and expensive than you might think. It’s especially problematic to support multiple types of computers and operating systems. Finally, there’s the all-important performance issue: You might have hundreds of clients making requests of your server at any one time, so any small delay is crucial. To minimize latency, programmers work hard to offload processing tasks, often to the client machine, but sometimes to other machines at the server site, using so-calledmiddleware. (Middleware is also used to improve maintainability.)The simple idea of distributing information has so many layers of complexity that the whole problem can seem hopelessly enigmatic. And yet it’s crucial: Client/server computing accounts for roughly half of all programming activities. It’s responsible for everything from t aking orders and credit-card transactions to the distribution of any kind of data—stock market, scientific, government, you name it. What we’ve come up with in the past is individual solutions to individual problems, inventing a new solution each time. These were hard to create and hard to use, and the user had to learn a new interface for each one. The entire client/server problem needs to be solved in a big way.The Web as a giant serverThe Web is actually one giant client/server system. It’s a bit worse than that, since you have all the servers and clients coexisting on a single network at once. You don’t need to know that, because all you care about is connecting to and interacting with one server at a time (even though you might be hopping around the world in your search for the correct server).Initially it was a simple one-way process. You made a request of a server and it handed you a file, which your machine’s browser software (i.e., the client) would interpret by formatting onto your local machine. But in short order people began wanting to do more than just deliver pages from a server. They wanted full client/server capability so that the client could feed information back to the server, for example, to do database lookups on the server, to add new information to the server, or to place an order (which required more security than the original systems offered). These are the changes we’ve been seeing in the development of the Web.The Web browser was a big step forward: the concept that one piece of information could be displayed on any type of computer without change. However, browsers were still rather primitive and rapidly bogged down by the demands placed on them. They weren’t particularly interactive, and tended to clog up both the server and the Internet because any time you needed to do something that required programming you had to send information back to the server to be processed. It could take many seconds or minutes to find out you had misspelled something in your request. Since the browse r was just a viewer it couldn’t perform even the simplest computing tasks. (On the other hand, it was safe, because it couldn’t execute any programs on your local machine that might contain bugs or viruses.)To solve this problem, different approaches have been taken. To begin with, graphics standards have been enhanced to allow better animation and video within browsers. The remainder of the problem can be solved only byincorporating the ability to run programs on the client end, under the browser. This is called client-side programming.Client-side programmingThe Web’s initial server-browser design provided for interactive content, but the interactivity was completely provided by the server. The server produced static pages for the client browser, which would simply interpret and display them. Basic HyperText Markup Language (HTML) contains simple mechanisms for data gathering: text-entry boxes, check boxes, radio boxes, lists and drop-down lists, as well as a button that can only be programmed to reset t he data on the form or “submit” the data on the form back to the server. This submission passes through the Common Gateway Interface (CGI) provided on all Web servers. The text within the submission tells CGI what to do with it. The most common action is to run a program located on the server in a directory that’s typically called “cgi-bin.” (If you watch the address window at the top of your browser when you push a button on a Web page, you can sometimes see “cgi-bin” within all the gobbledygook there.) These programs can be written in most languages. Perl has been a common choice because it is designed for text manipulation and is interpreted, so it can be installed on any server regardless of processor or operating system. However, Python (my favorite—see ) has been making inroads because of its greater power and simplicity.Many powerful Web sites today are built strictly on CGI, and you can in fact do nearly anything with CGI. However, Web sites built on CGI programs can rapidly become overly complicated to maintain, and there is also the problem of response time. The response of a CGI program depends on how much data must be sent, as well as the load on both the server and the Internet. (On top of this, starting a CGI program tends to be slow.) The initial designers of the Web did not foresee how rapidly this bandwidth would be exhausted for the kinds of applications people developed. For example, any sort of dynamic graphing is nearly impossible to perform with consistency because a Graphics Interchange Format (GIF) file must be created and moved from the server to the client for each version of the graph. And you’ve no doubt had direct experience with something as simple as validating the data on an input form. You press the submit button on a page; the data is shipped back to the server; the server starts a CGI program that discovers an error, formats an HTML page informing you of the error, and then sends the page back to you; you must then back up a page and try again. Not only is this sl ow, it’s inelegant.The solution is client-side programming. Most machines that run Web browsers are powerful engines capable of doing vast work, and with the original static HTML approach they are sitting there, just idly waiting for the server to dish up the next page. Client-side programming means that the Web browser is harnessed to do whatever work it can, and the result for the user is a much speedier and more interactive experience at your Web site.The problem with discussions of client-side programming is that they aren’t very different from discussions of programming in general. The parameters are almost the same, but the platform is different; a Web browser is like a limited operating system. In the end, you must still program, and this accounts for the dizzying array of problems and solutions produced by client-side programming. The rest of this section provides an overview of the issues and approaches in client-side programming.Plug-insOne of the most significant steps forward in client-side programming is the development of the plug-in. This is a way for a programmer to add new functionality to the browser by downloading a piece of code that plugs itself into the appropriate spot in the browser. It tells the browser “from now on you can perform this new activity.” (You need to download the plug-in only once.) Some fast and powerful behavior is added to browsers via plug-ins, but writing a plug-in is not a trivial task, and isn’t something you’d want to do as part of the process of building a particular site. The value of the plug-in for client-side programming is that it allows an expert programmer to develop a new language and add that language to a browser without the permission of the browser manufacturer. Thus, plug-ins provide a “back door” that allows the creation of new client-side programming languages (although not all languages are implemented as plug-ins).Scripting languagesPlug-ins resulted in an explosion of scripting languages. With a scripting language, you embed the source code for your client-side program directly into the HTML page, and the plug-in that interprets that language is automatically activated while the HTML page is being displayed. Scripting languages tend to be reasonably easy to understand and, because they are simply text that is part of an HTML page, they load very quickly as part of the single server hit required to procure that page. The trade-off is that your code is exposed for everyone to see (and steal). Generally, however, you aren’t doing amazingly sophist icated things with scripting languages, so this is not too much of a hardship.This points out that the scripting languages used inside Web browsers are really intended to solve specific types of problems, primarily the creation of richer and more interactive graphical user interfaces (GUIs). However, a scripting language might solve 80 percent of the problems encountered in client-side programming. Your problems might very well fit completely within that 80 percent, and since scripting languages can allow easier and faster development, you should probably consider a scripting language before looking at a more involved solution such as Java or ActiveX programming.The most commonly discussed browser scripting languages are JavaScript (which has nothing to do with Java; it’s named that way just to grab some of Java’s marketing momentum), VBScript (which looks like Visual BASIC), and Tcl/Tk, which comes from the popular cross-platform GUI-building language. There are others out there, and no doubt more in development. JavaScript is probably the most commonly supported. It comes built into both Netscape Navigator and the Microsoft Internet Explorer (IE). Unfortunately, the flavor of JavaScript on the two browsers can vary widely (the Mozilla browser, freely downloadable from , supports the ECMAScript standard, which may one day become universally supported). In addition, there are probably more JavaScript books available than there are for the other browser languages, and some tools automatically cr eate pages using JavaScript. However, if you’re already fluent in Visual BASIC or Tcl/Tk, you’ll be more productive using those scripting languages rather than learning a new one. (You’ll have your hands full dealing with the Web issues already.)原文来源:(美)Bruce Ecket. Thinking in JAVA第三版. 2003Java 和Internet可能你会问,如果Java只是一种新的计算机编程语言的话(实际上这话也没错),它为什么会那么重要,为什么会被除数拔高到“计算机编程领域的革命性的进步”,这个高度。
ThinkinginJava系列文档+代码+简评

ThinkinginJava系列⽂档+代码+简评声明:本⼈⽆意侵犯原作者的版权,这⾥可下载的⽂档都属于作者⾃⾏开放下载的,统⼀放置在这⾥是因为不可预测的原因使得原⽂档和代码不⽅便下载,故将我所收集的内容统⼀在这⾥,如果这⾥的内容侵犯了别⼈,请告知我会第⼀时间删除,谢谢理解。
Java编程思想(英⽂第4版) , +Java编程思想是不是⼀本好书呢?当然,在书中作者详细解释了Java的起源和语⾔的特点,通过学习这本书可以知其(Java)然也可以知其所以然。
读懂这本书后,你不仅仅是个会写程序的编码⼯⼈,⽽是成为⼀个专业的程序员。
这本书可否作为⼊门书籍呢?其实,作为Java的⼊门也未尝不可,只是因为其庞⼤的块头和相对艰涩的内容会使⼤部分初学者半途⽽废。
如果完全没有编程功底的⼈,当然就不要以此⼊门了,这绝对是⾃虐。
如何快速学习这本书呢?直接看Java编程思想第3版,跳过第1章,从第2章开始所有理论知识都跳过,⼿⼯输⼊所有代码,调试成功,然后再回过头看相关理论知识,能看懂多少看多少,看不懂的留下来,等以后在实践中碰到了再回头学习。
如何深⼊学习这套书呢?有强⼤意志⼒的可以从第1版开始往后看,看到第4版就可以对Java语⾔的发展史有个深刻的理解,甚⾄对于程序设计语⾔的发展历史也会有所了解(这个很重要),因为所有的语⾔其实都是相通的。
⼀门语⾔理解以后,再学其他语⾔(如:C++、Python 等)都会明⽩这个语⾔的特点在哪⾥,为何要这样设计语⾔,⽤在什么场合下效果最好。
如果这个语⾔因为设计的需要缺少某些特性的时候,可以通过什么⽅法来解决。
例如:Java 1.4以前是没有泛型的,那么第3版就没有介绍泛型的使⽤,⽽第4版才引⼊了泛型,那么通过对⽐第3版和第4版,既可以深⼊理解泛型的好处,也可以知道如何通过其他⼿段来解决这个问题。