Java编程语言外文翻译、英汉互译、中英对照.doc
外文翻译原文及译文学 院计算机学院专 业计算机科学与技术班 级学 号姓 名指导教师负责教师待添加的隐藏文字内容3Java(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 for other 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, eliminating many 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 same highly 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语言的目的是让应用程序开发商实现“一次编写,到处运行”(WORA),这意味着能在一个平台上运行的代码,不需要重新编译就可以在另一个平台上运行。Java应用程序通常被编译成字节码(类文件),这样就可以在任何Java虚拟机(JVM)上运行,并且不用理会计算机的体系结构。Java是直到2012年为止正在被广泛使用的最流行的编程语言之一,特别是客户机服务器的Web应用程序,现在有将近一千万个用户在使用。Java是由Sun公司(现已并入甲骨文公司)的James Gosling于1995年作为Sun公司Java平台的一个核心组件来开发以及发布的。java语言的语法来源于C语言和C + +,但java语言与它们相比则拥有了fewer low的水平设施。原始并参考的实现Java编译器,虚拟机和类库的功能是Sun公司在1991年开发并且在1995年首次发表的。截至2007年5月,为了与Java进程组织的规范相符,Sun公司使其大部分的Java技术在GNU通用公共许可证的规范下重新获得许可。其他公司也开发了多样的实现技术来替代Sun公司的这些技术,比如GNU编译器的Java和GNU 的类路径等。Java是一组来自Sun Microsystems公司(已并入甲骨文公司)的几个计算机软件产品和规格,它们共同提供了一个用于开发应用软件并将其部署在平台的计算环境系统。Java是一个被广泛的用于包括从嵌入式设备和移动手机这些低端的应用,到企业服务器和超级计算机这些高端的应用的计算平台。虽然不常见,但是Java applet有时也会在桌面电脑浏览万维网时被用来提供改进和安全功能。写Java编程语言是将生产代码部署为Java字节码的主要方法。然而,字节码编译器却可供如Ada、JavaScript、Python和Ruby等其他语言使用。 一些新设计的语言能够在本地运行Java虚拟机(JVM),比如Scala、Clojure和Groovy,虽然这些语言的Java语法在很大程度上借鉴于C语言和C + +,但面向对象的特性是仿照Smalltalk和objective C语言来设计完成的。Java消除了某些低级的构造例如指针,java还有一个非常简单的内存模型,在这个内存模型中的每个对象都可以在堆上分配空间并且变量引用的所有对象类型都可以使用。内存管理是由JVM提供的通过集成自动垃圾收集处理的。有一个版本的Java平台的名字来自一束相关的来自Sun公司的的程序,这个程序允许发展并且运行由Java编程语言编写的程序。这个平台不针对任何一个处理器和操作系统,而是一个以便Java程序可以运行在所有平台的执行引擎(称为虚拟机)和一个编译器以及一组实现对各种硬件和操作系统的功能的库。Java平台是由多个程序组成的,每个程序都提供整体功能的一部分。例如,Java编译器,它能将Java源代码为转变为Java字节码(一种中间语言的JVM),提供作为Java开发的工具包(JDK)。Java的运行环境简称为JRE,是用即时(JIT)编译器来补充JVM并将中间字节码转换为机器码,重新测试来检验产品内部动作是否按照规格说明本机代码来运行的软件。一套内容广泛并且多种多样的库同样是Java平台的一部分。Java语言的编译器、库和运行环境是java平台中十分必要的组件,在这个Java平台上的中间字节码的“执行”操作是根据虚拟机规范而制定的规则来执行的。在大多数现代操作系统中,大量的可重用的代码可以用来简化程序员的工作。这样的一段代码通常是在运行时提供了一组动态可加载的库,当应用程序在运行时就可以调用这些库了。因为Java平台是不依赖于任何特定的操作系统的,所以应用程序就不依赖于任何已有的操作系统库。相反的是, Java平台提供了一组全面的具有自己的标准的类库,这些类库具有普遍存在于现代操作系统中的同样的可重用功能。大多数的操作系统库也是用Java编写的。例如,描绘用户界面和处理事件本身的Swing库, 用于消除不同的平台处理类似的组件所用的不同的方法之间微妙的差异。Java库在Java平台内服务主要具有三个目的。首先,像其他标准代码库一样,Java库提供给程序员一系列众所周知的函数执行时常见的任务,比如维护列表条目或者执行复杂的字符串解析等。其次,这个类库提供给程序员一个抽象的接口任务,这个任务通常依赖于硬件和操作系统。任务,如网络访问和文件访问,通常是相互交错的独特的各平台的实现。和java的io库先在本地操作系统代码中实现一个抽象层,然后再提供一个具有标准接口的Java应用程序来执行这些任务。最后,当一些底层平台不支持一个Java应用程序所期望的所有的功能时,类库的工作就是要优雅地处理这些缺席,或者通过仿真组件提供一个替代,或至少提供一个一致的方式来检测是否有某一个特定的功能。Java成功和它的一次的编写,到处运行的概念导致了其他类似的产品的诞生,尤其是.NET框架,它自2002年出现以来,包含了许多Java成功的方面。在完整形式的.NET框架中(微软的实现),目前仅可以完全的在Windows平台上运行,而Java是完全可以在许多不同的平台上运行的。.NET框架为了支持多种编程语言而重新创建,而Java平台最初的建立只是为了支持Java语言,尽管许多其他语言也是为了JVM而创建的。.NET框架包含了一个类似于Java语言被称为视觉J #(原名J + +)的语言,但是这个语言不兼容Java规范和相关的类库,这个语言可以追溯到古老的JDK 1.1版本。由于这些原因,J#语言对比于.NET框架来说,是一个从Java平台到.NET平台过渡的语言切换。视觉J #语言已经于微软Visual Studio 2008版本开始停止发布。直到2015年为止,现有版本的语言与Visual Studio 2005将支持按照产品生命周期策略来运行。1994年6月到7月,经过与Sun公司的领导者约翰三天的头脑风暴,Sun公司的科学执行官高斯林与怀勒、诺顿、韦恩·罗辛、埃里克·施密特所组成的团队决定将这个有针对性的平台为万维网再保险。他们认为,随着图形web浏览器的发展,互联网正在演变成相对于电视来说相同高度的互动。Java的成功和其编写一次,到处运行的概念导致了其他类似的语言都以它作为原型,诺顿编写了一个小型的浏览器,网页的跑步者(以电影银翼杀手的名字命名的),后来改名为HotJava。那一年, 搜索后显示为Java语言商标改名,橡树被橡木技术所运用。尽管Java 1.0是一个可供下载的版本,但是在1994年,第一次公开发布的Java 1.0 a2与HotJava浏览器才是第一次真正意义上的可以开源下载Java平台。1995年5月23日,Gage在年内公布计会议上发表,他的发言伴随着一项由网景公司的执行副总裁马克·安德烈森带来的出人意料的公告, 网景浏览器将获得Java的支持。1996年1月9日, 由Sun Microsystems公司组成的JavaSoft集团来负责开发这项技术。