java介绍外文翻译

java介绍外文翻译
java介绍外文翻译

外文原文

Introduction to Java

autor:Martin Ngobye.

source:Computing Static Slice for Java Programs

Java is designed to meet the challenges of application development in the context of heterogeneous, network-wide distributed environments. Paramount among these challenges is secure delivery of applications that consume the minimum of system resources, can run on any hardware and software platform, and can be extended dynamically.

Java originated as part of a research project to develop advanced software for a wide variety of network devices and embedded systems. The goal was to develop a small, reliable, portable, distributed, real-time operating platform. When the project started, C++ was the language of choice. But over time the difficulties encountered with C++ grew to the point where the problems could best be addressed by creating an entirely new language platform. Design and architecture decisions drew from a variety of languages such as Eiffel, SmallTalk, Objective C, and Cedar/Mesa. The result is a language platform that has proven ideal for developing secure, distributed, network based end-user applications in environments ranging from network-embedded devices to the World-Wide Web and the desktop.

The design requirements of Java are driven by the nature of the computing environments in which software must be deployed.

The massive growth of the Internet and the World-Wide Web leads us to a completely new way of looking at development and distribution of software. To live in the world of electronic commerce and distribution, Java must enable the development of secure, high performance, and highly robust applications on multiple platforms in heterogeneous, distributed networks.

Operating on multiple platforms in heterogeneous networks invalidates the traditional schemes of binary distribution, release, upgrade, patch, and so on. To survive in this jungle, Java must be architecture neutral, portable, and dynamically adaptable.

The Java system that emerged to meet these needs is simple, so it can be easily programmed by most developers; familiar, so that current developers can easily learn Java; object oriented, to take advantage of modern software development methodologies and to fit into distributed client-server applications; multithreaded, for high performance in applications that need to perform multiple concurrent activities, such as multimedia; and interpreted, for maximum portability and dynamic capabilities.

Together, the above requirements comprise quite a collection of buzzwords, so let’s

examine some of them and their respective benefits before going on.

What’s completely new is the manner in which Java and its run-time system have combined them to produce a flexible and powerful programming system..

Developing your applications using Java results in software that is portable across multiple machine architectures, operating systems, and graphical user interfaces, secure, and high performance, With Java, your job as a software developer is much easier—you focus your full attention on the end goal of shipping innovative products on time, based on the solid foundation of Java. The better way to develop software is here, now, brought to you by the Java language platform.

Very dynamic languages like Lisp, TCL, and SmallTalk are often used for prototyping. One of the reasons for their success at this is that they are very robust—you don’t have to worry about freeing or corrupting memory.

Similarly, programmers can be relatively fearless about dealing with memory when programming in Java, The garbage collection sy stem makes the programmer’s job vastly easier; with the burden of memory management taken off the programmer’s shoulders, storage allocation errors go away. Another reason commonly given that languages like Lisp, TCL, and SmallTalk are good for prototyping is that they don’t require you to pin down decisions early on—these languages are semantically rich.

Java has exactly the opposite property: it forces you to make explicit choices. Along with these choices come a lot of assistance—you can write method invocations and, if you get something wrong, you get told about it at compile time. You don’t have to worry about method invocation error.

The Java beginner must grasp 30 basic concepts

Basic concept

1.In OOP the only relations is what the object’s interface, such as the computer seller he leaves alone internal structure of electrical source, but he is only concerned about that whether the power will be supplied to you, also so long as know can or not but is not how and why.All procedures are make up of certain attribute and the behavior object, the different object visit invokes through the function invocation, between the object all intercommunion are invoke through the method invocation, By object data encapsulation, enhances reuse rate very much..

2.In OOP the most important thought is class, the class is the template ,is a blueprint, construct an object from a class, namely construct an instance of the class.

3. Encapsulation: is that combines the data and the behavior in a package) and hides the data the realization process to the object user, in an object data is called its instance field.

4.Through expands a class to obtain a new class is called inheritance, but all classes are constructed by the object super root class of expansion, super root class of as follows can make the introduction.

5.Object 3 principal characteristics

Behavior--- explained this object can make what.

Tate--- when the object exerts the method object reflection.

Dentity--- and other similar behavior objects discrimination symbols.

Each object has only indentity and among three characteristics they affect mutually.

6. Relations among classes:

Use-a:Dependent relation

Has-a:Polymerization relation

Is-a: inheritor relation -- example:A class has inherited B class, this time A class not only has B class of method, but also has its own method(Individuality exists in general character)

7.Structure object use structure:Structure proposing, the structure is one special method, the structure object and to its initialization.

Example:A Data class of structure calls Data

New Data () --- structure a new object, also initialize current time.

Data happyday=new Data () --- an object evaluates an variable happyday, thus enables this object to be used many times, here be stated the cause variable and the object variable are different.

New returns the value is a quotation.

Constructor characteristic:The constructor may have 0, one or many parameters

The constructor and the class have the same name

A class may have many constructor. The constructor has not returned value

The constructor always be together used with the new operator

8. Over loading: When many methods have the same name when includes the different parameter, then has the over loading Which method does the compiler have to choose invokes.

9.Package : Java allow one or many classes to become together as group, is called package, to organizing duty easily, the standard Java storehouse divides into many packages https://www.360docs.net/doc/8b6402743.html,ng java.Util java, net and so on, the package is layered and all java packages are in java and in a javax package.

10. Extendable thought: permit to construct new class on existing classes , when you extend the class which already existed, then you reuse this class of method and the field,

at the same time you might add the new method and the field in the new class.

11.Expandable class:The expandable class fully manifested is-a to extend the relations The form is:Class (subclass) extends (base class).

12. Multi-modality: In java, the object variable is multi-modality But in java does not support multiple extend.

13.Dynamic combine: the mechanism of invoking object method mechanism.

1) compiler examines object statement type and method name.

2) the compiler examines that method invokes parameter type.

3) static combine: If the method type is priavte static the final ,compiler can accurately know which method should invoke.

4) when the procedure runs and uses dynamic combine to invoke a method, the method edition which then hypothesized machine must invoke x the object actual type which aims at to match.

5) dynamic combine: is a very important characteristic, it can cause the procedure to change again may expand but does not need to translate has saved the code.

14.Final class:In order to prevent other people derive the new class from yours class, this class is cannot expanded.

15.The dynamic invocation spend longer time than the static invocation expenditure.

16.Abstract class:Stipulated or many abstract methods class of itself must define is abstract.

Example: Public abstract string getDescripition

17.In Java each class is be extended by object class.

18. equal and toString method in object class .

Equal uses in testing an object is whether equal with another object.

ToString returns to represent this object the string of character, each class can nearly over loading this method, in order to returns to the current condition the correct expression.

(The toString method is a very important method)

19.General programming:Any class of type all values all may replace with a object class of variable.

20.The array tabulates: The ArrayList dynamic array tabulates, is a class of storehouse, defines in java.In uitl package, but automatic control array size.

21.in class and class of object ,getclass method returns to the class type an example, when the procedure start contains can increase in the main method class, hypothesized confidential increase all classes which he needs, each increase class all must increase the class

which it needs.

22.The class: class might dynamic operate the java code for the compilation the procedure to provide the formidable function reflection, this function was JavaBeans is specially useful, the use reflected Java to be able to support the VB programmer to be familiar with the use the tool.

procedure of analysis class ability is called the reflector, in Java to provide this function the package to call https://www.360docs.net/doc/8b6402743.html,ng.The reflect reflection mechanism is extremely formidable.

1) when run analysis class ability.

2) when run searches observes a class of object.

3) realizes the general array operation code.

4) provides the method object.

But this mechanism mainly aims at the tool but not the application and the procedure.

In the reflection mechanism most important part is that permits class that you inspect structure. With to API includes:

https://www.360docs.net/doc/8b6402743.html,ng.Reflect.Field returns to the field.

Java.Reflect.Method returns to the method.

https://www.360docs.net/doc/8b6402743.html,ng.Reflect.Constructor returns to the parameter.

Method pointer: Java does not have the method pointer, makes a method address another method, may invoke it in behind, but the interface is the better solution.

23. interface: should showing class could do what but not to assign how to do, a class may realize one or many interfaces.

24.The interface is not a class, but is to conforms to a interface request class of set of standard.

If realizes a interface to need 2 steps:

1) the statement class needs to realize assigns the interface.

2) provides in the interface all methods definition.

Stated a class realizes a interface to need to use the implements key words

Class actionB implements Comparable its actionb needs to provide the CompareTo method, the interface is not the class, cannot use a new example interface.

25.A class only then a super class, but a class can realize many interfaces. In a Java important interface: Cloneable

26.The interface and call-back :to programs a commonly used pattern is call-back,in the pattern, you may refer when this class of pattern settled specific time occurs returns to

adjusts on the object the method.

Example:ActionListener interface monitor.

Similar API includes:

Java.Swing.JOptionPane

Java.Swing.Timer

Java.Awt.Tookit

27.Object clone:The clone method is a object protection method, this meant your code cannot simple invoke it.

28.Inner class an inner class definition is the definition in another class.

The reason is:

1) an inner class object can visit founds its object realization, including private data.

2) about other classes in the same package in that, inner class can be hided.

3) the anonymous inner class may the very convenient definition accent.

In 4) uses the category to be possible the extremely convenient compilation event driver.

29.Agent class (proxy):

1) appointing all codes that interfaces request

2) all methods (toString equals) that object class define

30.Data type:Java is kind of emphasizing type language, each variable all must be declared its types at first, in java altogether has 8 basic types . four kinds are the long, two kinds are the float, one is the char, being used in the Unicode code char, Boolean.

1. java is simple

Java and C + + are very similar, but much simpler. All the high-level programming language features, is not absolutely necessary have been deleted. For example, Java does not overload operator, the title of the document, pre-processing, computing pointer, the structure of the joint, multi-dimensional array, templates and implicit type conversion. If you know a little C, C + + or Pascal, you will soon master Java. Here is a simple procedure JavaHelloWorld:

publicclassHelloInternet (

publicstaticvoidmain (Stringargv []) (

System. out. println ( "HelloIn-ternet!")

)

)

2. Java is object-oriented

Java is an object-oriented programming language. In addition to the simple types,

such as digital and Boolean operators in addition, Java is an object of most. As with any object-oriented languages, Java code also organized by category. Each category provides a definition of the object behavior. Another type of succession can be a kind of behavior. In the category of the root level, often the target category. Java support for the single type of inherited hierarchy. This means that each category can only inherit one other category. Some of the language to allow multiple inheritance, but it may cause confusion and unnecessarily complicated language. For example, imagine that an object would inherit two completely different category. Java also supports the kind of summary of the interface. This allows programmers to define the interface methods, and do not have to rush immediately to determine the methods to achieve. A type of interface can be a number of purposes in order to truly multi-inheritance of a number of advantages. The implementation of an object can be any number of interfaces. IDL interface and Java interface very similar. Very easy to set up IDLJ compiler. In other words, Java can be used to create a CORBA object system distributed object system. In the view of many computer systems use IDL interface and CORBA objects, such compatibility is important.

3. Java is a type of static

In a Java program, it is essential to the definition used by the target (number of characters, such as an array) type. This will help programmers quickly found because the procedure when the compiler can detect the type of error. However, Java System objects are also dynamic types. A requirement for the type of dynamic is often possible, so programmers can write the procedures for different types of objects to do different things.

4. Is a Java-based compiler

When running Java programs, which were first compiled into byte code. Byte code is very similar to the machine instructions, so Java program is very efficient. However, the byte code does not specifically for a particular machine, so no need to recompile Java program can be in many different computer implementation. Java source code files were compiled into a category, which is equivalent to process byte code performance. In a Java class file, and an example for all of the variables are in the light of, and for the first time in the implementation of the code be resolved. This makes the code more common and more easily subject to revision, but still high.

5. Java is architecture neutral

Java language is the same for each computer. For example, simple types are the same: 32-bit integer always, always 64-bit long integers. It is strange, such as C and C + + programming language, and so fashionable it is not the case. As a result of these languages so the definition of freedom, each of the compiler and development environment will be

different, so that this process nuisance become a transplant. Java programs can easily gain access to transplants, and there is no need to re-compile.

6. Java is a sound

Java program can not be caused by the collapse of the computer. Java careful testing of the system memory of each visit, make sure it is legitimate and will not cause any problems. However, even if the Java program may also be wrong. If there is some kind of unexpected things, the process will not collapse, and to abandon the exception. Procedures for such an exception would be found to address them. Traditional computer programs can access the full memory. May (unconsciously) to amend any of the value of memory, which will cause problems. Java program can only access memory to allow them access to those parts of the Java program can not modify it does not seek to change the value.

7. Java is a compact

As the Java is designed to run on a small computer, as a programming language for the system is relatively small. It effectively in more than 4MB of RAM to run on PC machine. Java translator occupied by only a few hundred KB. This translator for the Java platform independence and portability is reliable. Due to Java is very small, it is a very small computer memory, such as the Java-based PC, as well as television sets, ovens, telephone and home computer, and so on, it is ideal.

8. Java is a multi-threaded

Java program can run more than one thread. For example, it can be a thread in a time-consuming to complete the calculation, and other users to interact with the threads of dialogue. Therefore, users do not have to stop working, waiting for the Java computing time-consuming process. In the multi-threaded programming environment, it is often difficult because many things may occur at the same time. However, Java provides easy-to-use features simultaneously, so that the programming easier.

中文翻译

JA V A介绍

作者:Martin Ngobye.

出处:Computing Static Slice for Java Programs

Java是被设计用来解决在上下文分布式的异构网络中应用程序开发的问题。在这些复杂问题中,首要的是安全发布应用程序、消耗最小的系统资源、可以在任何硬件和软件平台上运行以及被动态地扩展。

Java最初是作为研发方案的一部分而开发的,这个研究方案是为了给广阔多样的网络设备和嵌入式系统开发高级的软件。目标是开发一个小巧的、可靠性高的、可移植的、分布式的、实时的操作系统平台。当这个方案开始的时候,C++是精选的语言,但是过了一段时间,用C++语言遇到的困难也随之增长,解决这些问题最好的办法是创造一个全新的语言平台。设计和体系结构的决定汲取了多种语言,例如Eiffel、SmallTalk,、Objective C以及Cedar/Mesa。结果证明这个语言平台是理想的,对于开发一个可靠性高的、可移植的、分布式的、基于终端用户网络的应用程序在多种环境中广泛搜索从嵌入网络的设备到万维网和桌上型电脑。

Java的需求设计通过自然状态的,在软件必须被配置的处理环境中被推动的。

因特网和万维网的巨大发展导致我们完全地以新的情形着眼于开发和发行软件。对于全球电子化的商业和销售发行的存在,Java必须使安全的,高性能的和非常健壮的应用程序在多平台异构的,分布式的网络中开发。

在异构的网络中,多平台上运行会使传统配置的二进制发送、释放、更新、补丁等等无效。为了在这些问题中幸存下来,Java必须是体系结构中立的、可移植的以及可以被动态的修改。

为满足以上的需求而开发的Java系统是简单的,所以它能够被绝大多数的程序员进行编程;熟悉的,所以当前的程序员学习Java语言是简单的;面向对象的,为了利用现代的软件开发方法学和适合分布式的客户机/服务器应用程序;多线程的,为了高性能在应用程序中需要执行多个并发的活动,例如多媒体;解释的,为了最大极限的可移植和动态的容量。

同时,以上的需求完全是由收集的时髦词语组成的,所以在开始以前让我们来查看它们中的一些和它们的各自的优点。

什么是完全新的,样式风格在Java语言和它的运行系统结合它们来产生一个灵通的且强大的编程系统。

在软件中,用Java语言开发的你的应用程序可以在多种机器总体结构、操作系统和图形用户接口之间移植。运用Java语言,诸如软件开发者的工作就会变得简单的多——你会把你的全部精力都集中在最终的目标:准时运送革新的产品、基于可靠的构造的

Java语言。较好的开发软件的方法在这里,现在,Java语言平台会带给你这些。

许多动态的语言像Lisp、TCL和SmallTalk通常被应用于原型构造技术它们成功原因中的一个在于它们非常健壮——你没有必要去担心关于解除或破坏存储器。

同样的,程序员可以相对大胆的处理存储器,当在Java语言里面编程的时候。垃圾回收系统使程序员的工作大为容易,卸下了程序员肩上存储管理之负担,存储分配错误不再发生。

一般认为像Lisp, TCL, 和SmallTalk这样一些语言十分适合于原型法的另一个理由,是因为它们不要求你受早期决定的约束——这些语言的语义是很丰富的。

Java语言有着严密的对应的属性:它促使你做出清楚的选择。伴随着这些选择带来了许多的协助——你可以写一个方法调用,而且如果你在编写时有一些错误的时候,在编译的时候将会被告知。你没有必要去担心关于方法调用的错误。

Java初学者需掌握的30个基本概念

基本概念:

1.OOP中唯一关系是什么是对象的接口,就像计算机的销售商不管电源内部结构是怎样的,它只关心能否给你提供电,也就是只要知道能或不能而不是知道怎样和为什么会有电。所有的程序是由一定的属性和行为对象组成的,不同的对象的访问通过函数调用来完成,对象间所有的交流都是通过方法调用,通过封装对象数据,很大限度上提高复用率。

2.OOP中最重要的思想是类,类是模板是蓝图,从类中构造一个对象,即创建了这个类的一个实例(instance)。

3.封装:就是把数据和行为结合起在一个包中,并对对象使用者隐藏数据的实现过程,一个对象中的数据叫他的实例字段(instance field)。

4.通过扩展一个类来获得一个新类叫继承(inheritance),而所有的类都是由Object根超类扩展而得,根超类下文会做介绍。

5.对象的3个主要特性:

Behavior——说明这个对象能做什么。

Tate——当对象施加方法时对象的反映。

Dentity——与其他相似行为对象的区分标志。

每个对象有唯一的indentity 而这3者之间相互影响。

6.类之间的关系:

use-a :依赖关系

has-a :聚合关系

is-a :继承关系——例:A类继承了B类,此时A类不仅有了B类的方法,还有其自己的方法(个性存在于共性中)。

7.构造对象使用构造器:构造器的提出,构造器是一种特殊的方法,构造对象并对其

初始化。

例:Data类的构造器叫Data。

New Data()——构造一个新对象,且初始化当前时间。

Data happyday=new Data()——把一个对象赋值给一个变量happyday,从而使该对象能够多次使用,此处要声明的使变量与对象变量二者是不同的。

new返回的值是一个引用。

构造器特点:构造器可以有0个,一个或多个参数。

构造器和类有相同的名字。

一个类可以有多个构造器,构造器没有返回值,构造器总是和new运算符一起使用。

8.重载:当多个方法具有相同的名字而含有不同的参数时,便发生重载.编译器必须挑选出调用哪个方法。

9.包(package)Java允许把一个或多个类收集在一起成为一组,称作包,以便于组织任务,标准Java库分为许多包https://www.360docs.net/doc/8b6402743.html,ng java.util java,net等,包是分层次的所有的java 包都在java和javax包层次内。

10.继承思想:允许在已经存在的类的基础上构建新的类,当你继承一个已经存在的类时,那么你就复用了这个类的方法和字段,同时你可以在新类中添加新的方法和字段。

11.扩展类:扩展类充分体现了is-a的继承关系,形式为:class (子类) extends (基类)。

12.多态:在java中,对象变量是多态的,而java中不支持多重继承。

13.动态绑定:调用对象方法的机制。

1)编译器检查对象声明的类型和方法名。

2)编译器检查方法调用的参数类型。

3)静态绑定:若方法类型为priavte static final 编译器会准确知道该调用哪个方法。

4)当程序运行并且使用动态绑定来调用一个方法时,那么虚拟机必须调用x所指向的对象的实际类型相匹配的方法版本。

5)动态绑定:是很重要的特性,它能使程序变得可扩展而不需要重编译已存代码。

14.final类:为防止他人从你的类上派生新类,此类是不可扩展的。

15.动态调用比静态调用花费的时间要长。

16.抽象类:规定一个或多个抽象方法的类本身必须定义为abstract。

例::public abstract string getDescripition

17.Java中的每一个类都是从Object类扩展而来的。

18.object类中的equal和toString方法。

equal用于测试一个对象是否同另一个对象相等。

toString返回一个代表该对象的字符串,几乎每一个类都会重载该方法,以便返回当前状态的正确表示(toString 方法是一个很重要的方法)。

19.通用编程:任何类类型的所有值都可以同object类性的变量来代替。

20.数组列表:ArrayList动态数组列表,是一个类库,定义在java.uitl包中,可自动调节数组的大小。

21.class类object类中的getclass方法返回class类型的一个实例,程序启动时包含在main方法的类会被加载,虚拟机要加载他需要的所有类,每一个加载的类都要加载它需要的类。

22.class类为编写可动态操纵java代码的程序提供了强大的功能反射,这项功能为JavaBeans特别有用,使用反射Java能支持VB程序员习惯使用的工具。

能够分析类能力的程序叫反射器,Java中提供此功能的包叫https://www.360docs.net/doc/8b6402743.html,ng.reflect反射机制十分强大。

1)在运行时分析类的能力。

2)在运行时探察类的对象。

3)实现通用数组操纵代码。

4)提供方法对象。

而此机制主要针对是工具者而不是应用及程序。

反射机制中的最重要的部分是允许你检查类的结构.用到的API有:

https://www.360docs.net/doc/8b6402743.html,ng.reflect.Field 返回字段。

java.reflect.Method 返回方法。

https://www.360docs.net/doc/8b6402743.html,ng.reflect.Constructor 返回参数。

方法指针:java没有方法指针,把一个方法的地址传给另一个方法,可以在后面调用它,而接口是更好的解决方案。

23.接口(Interface)说明类该做什么而不指定如何去做,一个类可以实现一个或多个interface。

24.接口不是一个类,而是对符合接口要求的类的一套规范。

若实现一个接口需要2个步骤:

1)声明类需要实现的指定接口。

2)提供接口中的所有方法的定义。

声明一个类实现一个接口需要使用implements 关键字。

class actionB implements Comparable 其actionb需要提供CompareTo方法,接口不是类,不能用new实例化一个接口。

25.一个类只有一个超类,但一个类能实现多个接口。Java中的一个重要接口:Cloneable。

26.接口和回调.编程一个常用的模式是回调模式,在这种模式中你可以指定当一个特定时间发生时回调对象上的方法。

例:ActionListener 接口监听。

类似的API有:

java.swing.JOptionPane

java.swing.Timer

java.awt.Tookit

27.对象clone:clone方法是object一个保护方法,这意味着你的代码不能简单的调用它。

28.内部类:一个内部类的定义是定义在另一个内部的类。

原因是:

1)一个内部类的对象能够访问创建它的对象的实现,包括私有数据。

2)对于同一个包中的其他类来说,内部类能够隐藏起来。

3)匿名内部类可以很方便的定义回调。

4)使用内部类可以非常方便的编写事件驱动程序。

29.代理类(proxy):

1)指定接口要求所有代码。

2)object类定义的所有的方法(toString equals)。

30.数据类型:Java是强调类型的语言,每个变量都必须先申明它的类型,java中总共有8个基本类型:4种是整型,2种是浮点型,一种是字符型,被用于Unicode编码中的字符,布尔型。

1.Java是简单的

Java与C++极为相似,但却简单得多。高级编程语言的所有特性中,不是绝对需要的都已删去了。例如,Java没有算符过载、标题文件、预处理、指针运算、结构、联合、多维数组、模板及隐式类型变换。如果你知道一点C、C++或Pascal,你很快就会驾驭Java。这里是一个简单的JavaHelloWorld程序:

publicclassHelloInternet{

publicstaticvoidmain(Stringargv[]){

System。out。println(“HelloIn-ternet!”)

}

}

2.Java是面向对象的

Java是一种面向对象的编程语言。除了简单的类型,如数字和布尔算子之外,Java 中的大部分都是对象。正如任何面向对象的语言一样,Java代码也按类组织。每个类定义一组规定对象行为的方法。一个类可以继承另一个类的行为。在类的根层次上,通常是类对象。Java支持单继承类层次结构。这就是说,每个类一次只能继承一个别的类。有些语言允许多继承性,但这可能造成混乱,使语言不必要地复杂化。例如,难以想像,一个对象会继承两个完全不同的类的行为。Java还支持摘要类的接口。这允许编程人员先定义接口的方法,而不必急于马上确定方法的实现。一个类可以施行多个接口,从而

具有真正多继承性的许多优点。一个对象也可实施任意数量的接口。Java接口与IDL接口极其相似。很容易建立IDLJ编译器。这就是说,Java可用于CORBA对象系统来建立分布式对象系统。鉴于在许多计算机系统中都采用IDL接口和CORBA对象系统,这种兼容性是重要的。

3.Java是静态类型的

在一个Java程序中,必须定义所用对象(数字、字符、数组等)的类型。这有助于编程人员很快发现问题,因为当程序编译时可以检测类型错误。不过,Java系统中的对象也有动态类型。要求一个对象为动态类型往往是可能的,所以编程人员写的程序可以对不同类型的对象做不同的事。

4.Java是编译型的

当运行Java程序时,它首先被编译成字节代码。字节代码非常类似于机器指令,所以Java程序非常高效。然而,字节代码并不专对一种特定的机器,所以Java程序无需重新编译便可在众多不同的计算机上执行。Java源程序被编译成类文件,它相当于程序的字节代码表现。在一个Java类文件中,所有对方法及实例变量的参照均按名进行,并在第一次执行代码时加以分辨。这使得代码更通用,更不易受修改的影响,而仍具高效。

5.Java是体系结构中立的

Java语言对每种计算机都一样。比如,简单的类型都是不变的:整数总是32位,长整数总是64位。令人奇怪的是,诸如C及C++等时髦的编程语言却不是这样。由于这些语言定义如此自由,每种编译器及开发环境便各有不同了,这使程序的移植成为讨厌的问题。Java程序的移植却很容易,而且不需要进行重新编译。

6.Java是健全的

Java程序不可能造成计算机崩溃。Java系统仔细检测对内存的每次访问,确认它是合法的,而且不致引起任何问题。不过,即使Java程序也可能有错误。如果出现某种出乎意料之事,程序不会崩溃,而把该例外抛弃。程序会发现这类例外,并加以处理。传统的程序可以访问计算机的全部内存。程序可能(无意识地)修改内存中的任何值,这就会造成问题。Java程序只能访问内存中允许它们访问的那些部分,所以Java程序不可能修改不拟修改的值。

7.Java是小巧的

由于Java的设计是要在小的计算机上运行,作为一种编程语言来说其系统是相对较小的。它能有效地在4MB以上RAM的PC机上运行。Java翻译器只占用几百KB。这种翻译器对Java的平台无关性和可移植性是可靠的。由于Java很小,它对内存很小的计算机,如基于Java的PC机,以及电视机、烤箱、电话机及家用计算机等,是很理想的。

8.Java是多线程的

Java程序可以执行一个以上的线程。比如,它可以在一个线程中完成某一耗时的计

算,而其它线程与用户进行交互对话。所以用户不必停止工作,等待Java程序完成耗时的计算。在多线程环境中的编程通常是困难的,因为许多东西可能同时出现。但是,Java 提供了易于使用的同步特性,使编程更为方便。

外文翻译java

外文资料译文及原文 Java Java I/O 系统 对编程语言的设计者来说,创建一套好的输入输出(I/O)系统,是一项难度极高的任务。 这一点可以从解决方案的数量之多上看出端倪。这个问题难就难在它要面对的可能性太多了。不仅是因为有那么多I/O的源和目地(文件,控制台,网络连接等等),而且还有很多方法(顺序的『sequential』,随机的『random-access』,缓存的『buffered』,二进制的『binary』,字符方式的『character』,行的『by lines』,字的『by words』,等等)。 Java类库的设计者们用"创建很多类"的办法来解决这个问题。坦率地说Java I/O系统的类实在是太多了,以至于初看起来会把人吓着(但是,具有讽刺意味的是,这种设计实际上是限制了类的爆炸性增长)。此外,Java在1.0版之后又对其I/O类库作了重大的修改,原先是面向byte的,现在又补充了面向Unicode字符的类库。为了提高性能,完善功能,JDK 1.4又加了一个nio(意思是"new I/O"。这个名字会用上很多年)。这么以来,如果你想对Java的I/O 类库有个全面了解,并且做到运用自如,你就得先学习大量的类。此外,了解 I/O类库的演化的历史也是相当重要的。可能你的第一反应是"别拿什么历史来烦我了,告诉我怎么用就可以了!"但问题是,如果你对这段历史一无所知,很快就会被一些有用或是没用的类给搞糊涂了。

本章会介绍Java标准类库中的各种I/O类,及其使用方法。 File 类 在介绍直接从流里读写数据的类之前,我们先介绍一下处理文件和目录的类。 File类有一个极具欺骗性的名字;或许你会认为这是一个关于文件的类,但它不是。你可以用它来表示某个文件的名字,也可以用它来表示目录里一组文件的名字。如果它表示的是一组文件,那么你还可以用list( )方法来进行查询,让它会返回String数组。由于元素数量是固定的,因此数组会比容器更好一些。如果你想要获取另一个目录的清单,再建一个File对象就是了。实际上,叫它"FilePath"可能会更好一些。下面我们举例说明怎样使用这个类及其相关的FilenameFilter接口。 目录列表器 假设你想看看这个目录。有两个办法。一是不带参数调用list( )。它返回的是File对象所含内容的完整清单。但是,如果你要的是一个"限制性列表(restricted list)"的话——比方说,你想看看所有扩展名为.java的文件——那么你就得使用"目录过滤器"了。这是一个专门负责挑选显示File对象的内容的类。 下面就是源代码。看看,用了java.utils.Arrays.sort( )和11章的AlphabeticComparator之后,我们没费吹灰之力就对结果作了排序(按字母顺序): //: c12:DirList.java // Displays directory listing using regular expressions. // {Args: "D.*\.java"} import java.io.*; import java.util.*; import java.util.regex.*; import com.bruceeckel.util.*; public class DirList { public static void main(String[] args) { File path = new File("."); String[] list; if(args.length == 0) list = path.list(); else list = path.list(new DirFilter(args[0])); Arrays.sort(list, new AlphabeticComparator());

JAVA外文文献+翻译

Java and the Internet If 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 programming The Web’s in itial 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 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 must

JAVA外文文献翻译基于Java技术的Web应用设计模型的比较研究

中文翻译 基于Java技术的Web应用设计模型的比较研究 来源:School of Computer Science and Engineering University of New South Wales Sydney, NSW 2052, Australia 作者:Budi Kurniawan and Jingling Xue 摘要 Servlet技术是在建立可扩展性Web应用中被应用最广泛的技术。在运用JAVA技术开发Web应用中有四种模型,分别是:Model 1、Model 2、Struts和JavaServer Faces JSF。Model 1使用一连串的JSP页面,Model 2采用了模型,视图,控制器MVC模式。Struts是一个采用了Model 2设计模型的框架,JSF是一种支持ready-to-use组件来进行快速Web应用开发的新技术。Model 1对于中等和大型的应用来说很难维护,所以不推荐使用。本文通过利用Model 2、Struts和JSF这三种模型分别构建三个不同版本的在线商店应用程序来比较和评价这三种模型在应用程序开发和性能上的差异。 1.绪论 当今Web应用是一种展现动态内容的最普遍的方式。构建Web应用有许多种方法,其中最流行的是Servlet技术。这种技术的流行是因为它比CGI、PHP等其他技术更具优越性。然而Servlet对于开发来说还是麻烦的,因为它在传送HTML 标签时需要程序员将他们组合成为一个字符串对象,再将这个对象传给浏览器。同样的,对于输出的一个很小的改动也要求Servlet被重新编译。基于这个原因SUN 公司发明了JavaServer Pages JSP技术。JSP允许HTML标签和Java代码混合在

JAVA思想外文翻译毕业设计

文献来源: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是专为文字的处理及解释而设计的,所以能在任何服务器上安装和使用,无论采用的处理器或操作系统是什么。 2、脚本编制语言 插件造成了脚本编制语言的爆炸性增长。通过这种脚本语言,可将用于自己客户端程序的源码直接插入HTML页,而对那种语言进行解释的插件会在HTML 页显示的时候自动激活。脚本语言一般都倾向于尽量简化,易于理解。而且由于它们是从属于HTML页的一些简单正文,所以只需向服务器发出对那个页的一

Java的面向对象编程外文资料翻译

毕业设计(论文)外文资料翻译 系:计算机系 专业:计算机科学与技术 姓名: 学号: 外文出处:Ghosh,D..Java Object-oriented (用外文写) programming[J]. IEEE Transactions on Software Engineering,2009, 13(3):42-45. 附件: 1.外文资料翻译译文;2.外文原文。

注:请将该封面与附件装订成册。

附件1:外文资料翻译译文 Java的面向对象编程 ——面向对象编程和它的关键技术—继承和多态性 软件的重用可以节省程序开发时间。它鼓励重复使用已经调试好的高质量的软件,从而减少系统运行后可能出现的问题。这些都是令人振奋的可能性。多态性允许我们用统一的风格编写程序,来处理多种已存在的类和特定的相关类。利用多态性我们可以方便地向系统中添加新的功能。继承和多态对于解决软件的复杂性是一种有效可行的技术。当创建一个新的类时,而不用完整的写出新的实例变量和实例方法,程序员会指定新的类继承已定义的超类的实例变量和实例方法。这个新的类被称为一个子类。每个子类本身将来亦可有新的子类,而其本身将成为父类。一个类的直接父类就是该类所直接继承的类(通过关键字extends继承)。一个间接超类是通过从两级或更多级以上的类继承而来的。例如,从类JApplet(包javax.swing 中)扩展来的类Applet(包java.applet)。一个类单一的从一个父类继承而来。 Java 不支持多重继承(而C++可以),但它支持接口的概念。接口可以使Java实现许多通过多重继承才能实现的优点而没有关联的问题。我们将在本章讨论的接口的详细内容。我们会给出创建和使用接口的一般规律和具体实例。一个子类通常添加自己的实例变量和自己的实例方法,因此子类通常比父类大。一个子类比它的父类更具体并且代表一组更小、更专业的对象。通过单一继承,子类在开始时拥有父类的所有特性。继承性真正的力量在于它可以在定义子类时增加或取代从超类中继承来的特征。每个子类对象也是该类的父类的对象。例如,每一个我们所定义的小程序被认为是类JApplet 的对象。此外,因为Japplet继承了Applet,每一个我们所定义的小程序同时也被认为是一个Applet 的对象。当开发applets时,这些信息是至关重要的,因为一个小程序容器只有当它是一个Applet才可以执行一个程序。虽然子类对象始终可以作为它的父类的一种来看待,父类对象却不被认为是其子类类型的对象。我们将利用这种“子类对象是父类对象”的关系来执行一些强大的操作。例如,绘图程序可以显示一系列图形,如果所有的图形类型都直接或间接地继

java外文翻译

毕业设计外文资料翻译 (译文) 题目名称:Java and the Internet 学院:计算机科学技术 专业年级:计算机科学与技术(师)08 级 学生姓名:aaa 班级学号:a班a号 指导教师:aaa

二○一一年五月十三日 译文题目:Java和因特网 原文题目:Java and the Internet 原文出处:https://www.360docs.net/doc/8b6402743.html,/view.html

Java and the Internet If 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 programming The 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 so metimes 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 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 eac h 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

15000字的Java外文翻译

xxxx大学高新学院毕业设计(论文) 外文翻译 学生姓名: 院(系): 专业班级: 指导教师: 完成日期:

JSP基础学习资料 一、JSP 技术概述 在Sun 正式发布JSP(JavaServer Pages) 之后,这种新的Web 应用开发技术很快引起了人们的关注。JSP 为创建高度动态的Web 应用提供了一个独特的开发环境。按照Sun 的说法,JSP 能够适应市场上包括Apache WebServer 、IIS4.0 在内的85% 的服务器产品。即使您对ASP “一往情深”,我们认为,关注JSP 的发展仍旧很有必要。 ㈠JSP 与ASP 的简单比较 JSP 与Microsoft 的ASP 技术非常相似。两者都提供在HTML 代码中混合某种程序代码、由语言引擎解释执行程序代码的能力。在ASP 或JSP 环境下,HTML 代码主要负责描述信息的显示样式,而程序代码则用来描述处理逻辑。普通的HTML 页面只依赖于Web 服务器,而ASP 和JSP 页面需要附加的语言引擎分析和执行程序代码。程序代码的执行结果被重新嵌入到HTML 代码中,然后一起发送给浏览器。ASP 和JSP 都是面向Web 服务器的技术,客户端浏览器不需要任何附加的软件支持。 ASP 的编程语言是VBScript 之类的脚本语言,JSP 使用的是Java ,这是两者最明显的区别。此外,ASP 与JSP 还有一个更为本质的区别:两种语言引擎用完全不同的方式处理页面中嵌入的程序代码。在ASP 下,VBScript 代码被ASP 引擎解释执行;在JSP 下,代码被编译成Servlet 并由Java 虚拟机执行,这种编译操作仅在对JSP 页面的第一次请求时发生。 ㈡运行环境 Sun 公司的JSP 主页在https://www.360docs.net/doc/8b6402743.html,/products/jsp/index.html ,从这里还可以下载JSP 规范,这些规范定义了供应商在创建JSP 引擎时所必须遵从的一些规则。 执行JSP 代码需要在服务器上安装JSP 引擎。此处我们使用的是Sun 的JavaServer Web Development Kit (JSWDK )。为便于学习,这个软件包提供了大量可供修改的示例。安装JSWDK 之后,只需执行startserver 命令即可启动服务器。在默认配置下服务器在端口8080 监听,使用http://localhost:8080 即可打开缺省页面。 在运行JSP 示例页面之前,请注意一下安装JSWDK 的目录,特别是“ work ”子目录下的内容。执行示例页面时,可以在这里看到JSP 页面如何被转换成Java 源文件,然后又被编译成class 文件(即Servlet )。JSWDK 软件包中的示例页

java外文翻译资料

*** 学院 毕业设计(论文)外文资料翻译 系(院):计算机工程学院 专业:计算机科学与技术(软件技术)姓名:*** 学号:*** 外文出处:The Programmer (用外文写) 附件: 1.外文资料翻译译文;2.外文原文。

注:请将该封面与附件装订成册。

附件1:外文资料翻译译文 JSP技术概述 JSP的优点 JSP页面最终会转换成servler。因而,从根本上,JSP页面能够执行的任何任务都可以用servler来完成。然而,这种底层的等同性并不意味着servler和JSP页面对于所有的情况都等同适用。问题不在于技术的能力,而是二者在便利性、生产率和可维护性上的不同。毕竟,在特定平台上能够用Java编程语言完成的事情,同样可以用汇编语言来完成,但是选择哪种语言依旧十分重要。 和单独使用servler相比,JSP提供下述好处: (1)JSP中HTML的编写与维护更为简单。JSP中可以使用常规的HTML:没有额外的反斜杠,没有额外的双引号,也没有暗含的Java语法。 (2)能够使用标准的网站开发工具。即使对那些对JSP一无所知的HTML 工具,我们也可以使用,因为它们会忽略JSP标签(JSP tags)。 (3)可以对开发团队进行划分。Java程序员可以致力于动态代码。Web 开发人员可以将经理集中在表示层(presentation layer)上。对于大型的项目,这种划分极为重要。依据开发团队的大小,及项目的复杂程度,可以对静态HTML和动态内容进行弱分离(weaker separation)和强分离(stronger separation)。 在此,这个讨论并不是让您停止使用servlets,只使用JSP。几乎所有的项目都会同时用到这两种技术。针对项目中的某些请求,您可能会在MVC构架下组合使用这两项技术。我们总是希望用适当的工具完成相对应的工作,仅仅是servlet并不能填满您的工具箱。 JSP相对于竞争技术的优势

(完整版)Java外文翻译1毕业设计

以下文档格式全部为word格式,下载后您可以任意修改编辑。 毕业设计(论文)外文文献翻 译 译文: Java IO 系统[1] 对编程语言的设计者来说,创建一套好的输入输出(IO)系统,是一项难度极高的任务。 这一类可以从解决方案的数量之多上看出端倪。这个问题就难在它要面对的可能性太多了。不仅是因为有那么多的IO的源和目的(文件,控制台,网络连接等等),而且还有很多方法(顺序的,随机的,缓存的,二进制的,字符方式的,行的,字的等等)。 Java类库的设计者们用“创建很多类”的办法来解决这个问题。坦率地说,Java IO系统的类实在太多了,以至于初看起来会把人吓着(但是,具有讽刺意味的是,这种设计实际上是限制了类的爆炸性增长)。此外,Java在1.0版之后又对其IO类库进行了重大的修改,原先是面向byte的,现在又补充了面向Unicode字符的类库。为了提高性能,完善功能,JDK1.4又加了一个nio(意思是“new IO”。这个名字会用上很多年)。这么以来,如果你想对Java 的IO类库有个全面了解,并且做到运用自如,你就得先

学习大量的类。此外,了解IO类库的演化历史也是相当重要的。可能你的第一反应是“别拿什么历史来烦我了,告诉我怎么用就可以了!”但问题是,如果你对这段一无所知,很快就会被一些有用或是没用的类给搞糊涂了。 本文会介绍Java 标准类库中的各种IO类,及其使用方法。 File 类 在介绍直接从流里读写数据的类之前,我们先介绍一下处理文件和目录的类。 你会认为这是一个关于文件的类,但它不是。你可以用它来表示某个文件的名字,也可以用它来表示目录里一组文件的名字。如果它表示的是一组文件,那么你还可以用list( )方法来进行查询,让它会返回String 数组。由于元素数量是固定的,因此数组会比容器更好一些。如果你想要获取另一个目录的清单,再建一个File对象就是了。 目录列表器 假设你想看看这个目录。有两个办法。一是不带参数调用list( )。它返回的是File对象所含内容的完整清单。但是,如果你要的是一个"限制性列表(restricted list)"的话——比方说,你想看看所有扩展名为.java的文件——那么你就得使用"目录过滤器"了。这是一个专门负责挑选显示File对象的内容的类。 FilenameFilter接口的声明: public interface FilenameFilter { boolean accept(File dir, String name); } accept( )方法需要两个参数,一个是File对象,表示这个文件是在

(完整版)毕设外文翻译-详细解析Java中抽象类和接口的区别

Parsing Java Abstraction of the Difference Between Classes and Interfaces In Java language, abstract scale-up and with support class abstraction definition of two mechanisms. Because of these two kinds of mechanism of existence, just gives Java powerful object-oriented skills. Abstract scale-up and with between classes abstraction definition for support has great similarities, even interchangeable, so many developers into line non-abstract class definition for abstract scale-up and it is becoming more casual with choice. In fact, both between still has the very big difference, for their choice even reflected in problem domain essence of understanding, to design the intentions of the understanding correctly and reasonable. This paper will for the difference analysis, trying to give a developer with a choice between them are based. Understand class abstraction Abstract class and interface in Java language is used for abstract classes (in this article non-abstract class not from abstract scale-up translation, it represents an abstract body, and abstract scale-up for Java language used to define class abstraction in one way, please readers distinguish) defined, then what are the abstract classes, use abstract classes for us any good? In object-oriented concept, we know all objects is through class to describe, but in turn not such. Not all classes are used to describe object, if a class does not contain enough information to portray a concrete object, this class is abstract classes. Abstract classes are often used to characterization of problem field in our analysis, design that the abstract concepts, is to the series will look different, but essentially the same exact conception of abstraction. For example: if we carry out a graphical editing software development, will find problem domain exists round, triangle so some specific concept, they are different, but they all belong to shape such a concept, shape this concept in problem domain is not exist, it is an abstract concept. Precisely because the abstract concepts in problem field no corresponding specific concept, so to characterization abstract concepts non-abstract class cannot be instantiated. In an object-oriented field, mainly used for class abstraction types hidden. We can

java介绍外文翻译

外文原文 Introduction to Java autor:Martin Ngobye. source:Computing Static Slice for Java Programs Java is designed to meet the challenges of application development in the context of heterogeneous, network-wide distributed environments. Paramount among these challenges is secure delivery of applications that consume the minimum of system resources, can run on any hardware and software platform, and can be extended dynamically. Java originated as part of a research project to develop advanced software for a wide variety of network devices and embedded systems. The goal was to develop a small, reliable, portable, distributed, real-time operating platform. When the project started, C++ was the language of choice. But over time the difficulties encountered with C++ grew to the point where the problems could best be addressed by creating an entirely new language platform. Design and architecture decisions drew from a variety of languages such as Eiffel, SmallTalk, Objective C, and Cedar/Mesa. The result is a language platform that has proven ideal for developing secure, distributed, network based end-user applications in environments ranging from network-embedded devices to the World-Wide Web and the desktop. The design requirements of Java are driven by the nature of the computing environments in which software must be deployed. The massive growth of the Internet and the World-Wide Web leads us to a completely new way of looking at development and distribution of software. To live in the world of electronic commerce and distribution, Java must enable the development of secure, high performance, and highly robust applications on multiple platforms in heterogeneous, distributed networks. Operating on multiple platforms in heterogeneous networks invalidates the traditional schemes of binary distribution, release, upgrade, patch, and so on. To survive in this jungle, Java must be architecture neutral, portable, and dynamically adaptable. The Java system that emerged to meet these needs is simple, so it can be easily programmed by most developers; familiar, so that current developers can easily learn Java; object oriented, to take advantage of modern software development methodologies and to fit into distributed client-server applications;

java毕业论文外文文献翻译

Advantages of Managed Code Microsoft intermediate language shares with Java byte code the idea that it is a low-level language witha simple syntax , which can be very quickly translated intonative machine code. Having this well-defined universal syntax for code has significant advantages. Platform independence First, it means that the same file containing byte code instructions can be placed on any platform; atruntime the final stage of compilation can then be easily accomplished so that the code will run on thatparticular platform. In other words, by compiling to IL we obtain platform independence for .NET, inmuch the same way as compiling to Java byte code gives Java platform independence. Performance improvement IL is actually a bit more ambitious than Java bytecode. IL is always Just-In-Time compiled (known as JIT), whereas Java byte code was ofteninterpreted. One of the disadvantages of Java was that, on execution, the process of translating from Javabyte code to native executable resulted in a loss of performance. Instead of compiling the entire application in one go (which could lead to a slow start-up time), the JITcompiler simply compiles each portion of code as it is called (just-in-time). When code has been compiled.once, the resultant native executable is stored until the application exits, so that it does not need to berecompiled the next time that portion of code is run. Microsoft argues that this process is more efficientthan compiling the entire application code at the start, because of the likelihood that large portions of anyapplication code will not actually be executed in any given run. Using the JIT compiler, such code willnever be compiled.

相关文档
最新文档