java教程 doc,java 基础教程.doc

《java 基础教程.doc》由会员分享,可在线阅读,更多相关《java 基础教程.doc(23页珍藏版)》请在金锄头文库上搜索。

1、第1章 Java的起源23第1部分 Java语言第1章 Java的起源When the chronicle of computer languages is written, the following will be said: B led to C, C evolved into C+, and C+ set the stage for Java. To understand Java is to understand the reasons that drove its creation, the forces that shaped it, and the legacy that it。

2、 inherits. Like the successful computer languages that came before, Java is a blend of the best elements of its rich heritage combined with the innovative concepts required by its unique environment. While the remaining chapters of this book describe the practical aspects of Javaincluding its syntax。

3、, libraries, and applicationsin this chapter, you will learn how and why Java came about, and what makes it so important.说起Page: 1对于对于计算机语言的发展史,业界一般大家一般Page: 1业界认为:B语言导致了C语言的诞生B语言促成了 C语言Page: 1B语言导致了 C语言的诞生,C语言演变出了C+语言,而C+语言将让位于Java语言。要想更好地了解Java语言,就必须了解它产生的原因、推动它发展的动力,以及它对其他语言的继承。像以前其他成功的计算机语言一样,Ja。

4、va继承了其他语言的先进原理,同时又因其独特的环境要求而提出了一些创新性的概念。在这本书的其他各章中,将从实用的角度,对Java语言、库及应用程序进行包括语法在内的详细介绍。在本章里,我们将介绍Java语言产生的背景、发展过程,以及使它变得如此重要的原因它为什么变得如此重要的原因Page: 1什么使它变得如此重要。Although Java has become inseparably linked with the online environment of the Internet, it is important to remember that Java is first and fo。

5、remost a programming language. Computer language innovation and development occurs for two fundamental reasons:To adapt to changing environments and usesTo implement refinements and improvements in the art of programmingAs you will see, the creation of Java was driven by both elements in nearly equa。

6、l measure.尽管Java语言已和Internet的在线环境密不可分,但首先应该注意到的最重要一点是:它是一种程序语言。计算机语言的革新和发展需要2个基本因素的驱动:适应正在变化的环境和需求实现编程艺术的完善与提高下面你将看到,Java也正是在这两个因素的驱动下产生的。Java is related to C+, which is a direct descendent of C. Much of the character of Java is inherited from these two languages. From C, Java derives its syntax. Ma。

7、ny of Javas object-oriented features were influenced by C+. In fact, several of Javas defining characteristics come fromor are responses toits predecessors. Moreover, the creation of Java was deeply rooted in the process of refinement and adaptation that has been occurring in computer programming la。

8、nguages for the past three decades. For these reasons, this section reviews the sequence of events and forces that led up to Java. As you will see, each innovation in language design was driven by the need to solve a fundamental problem that the preceding languages could not solve. Java is no except。

9、ion.1.1 Java的由来Java总是和C+联系在一起,而C+则是从C语言派生而来的,所以Java语言继承了这两种语言的大部分特性。Java的语法是从C继承的,Java许多的面向对象的特性受到C+的影响。事实上,Java中几个自定义的特性都来自于或可以追溯到它的前驱。而且,Java语言的产生与过去30年中计算机语言细致改进和适应Page: 2不断不断发展密切相关。基于这些原因,本节将按次序Page: 2顺序顺序回顾促使Java产生的事件和推动力。正如你将看到的一样,每一次语言设计的革新都是因为先前的语言不能解决目前遇到的的基本问题而引起。Java也不例外。1.1.1 现代的编程语言的诞生:。

10、C语言 The C language shook the computer world. Its impact should not be underestimated, because it fundamentally changed the way programming was approached and thought about. The creation of C was a direct result of the need for a structured, efficient, high-level language that could replace assembly 。

11、code when creating systems programs. As you probably know, when a computer language is designed, trade-offs are often made, such as the following:Ease-of-use versus powerSafety versus efficiencyRigidity versus extensibilityC语言的产生震撼了整个计算机界。它的影响不应该被低估,因为它从根本上改变了编程的方法和思路。C语言的产生是人们追求结构化、高效率、高级语言的直接结果,可用。

12、它替代汇编语言开发系统程序。当设计一种计算机语言时,经常要从以下几方面进行权衡:易用性与功能易用和功能强大安全性和效率性稳定性和可扩展性C语言出现以前,程序员们不得不经常在有一方面优点而另一方面不足Page: 3有优点而又有欠缺的语言之间做出选择程序员们不得不经常在有优点但在某些方面又有欠缺的语言之间做出选择。例如,尽管公认FORTRAN在科学计算应用方面可以编写出相当高效的程序,但它不适于编写系统程序。BASIC虽然容易学习,但功能不够强大,并且谈不上结构化,这使它应用到大程序的有效性受到怀疑。汇编语言虽能写出高效率的程序,但是学习或有效地使用它却是不容易的。而且,调试汇编程序也相当困难。A。

13、nother compounding problem was that early computer languages such as BASIC, COBOL, and FORTRAN were not designed around structured principles. Instead, they relied upon the GOTO as a primary means of program control. As a result, programs written using these languages tended to produce “spaghetti co。

14、de”a mass of tangled jumps and conditional branches that make a program virtually impossible to understand. While languages like Pascal are structured, they were not designed for efficiency, and failed to include certain features necessary to make them applicable to a wide range of programs. (Specif。

15、ically, given the standard dialects of Pascal available at the time, it was not practical to consider using Pascal for systems-level code.)另一个复杂的问题是,早期设计的计算机语言(如BASIC,COBOL,FORTRAN等)没有考虑结构化设计原则,使用GOTO语句作为对程序控制的一中主要方法语句作为对程序进行控制的一种主要方法。这样做的结果是,用这些语言编写的程序往往成了“意大利面条式的程序代码”,一大堆混乱的跳转语句和条件分支语句使得程序几乎不可能被读懂。

16、。Pascal虽然是结构化语言,但它的设计效率比较低,而且缺少几个必需的特性,因而无法在大的编程范围内使用(特别是,给定的Pascal的标准语言在特定时间是可用的,但将Pascal作为系统级程序Page: 3语言考虑是不实际的作为系统级编码是不切实际的)。So, just prior to the invention of C, no one language had reconciled the conflicting attributes that had dogged earlier efforts. Yet the need for such a language was pressing. By the early 1970s, the computer revolution was beginning to take ho。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值