⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1.doc.html

📁 java语言规范
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a name="237589"></a>
Chapter 15 describes Java's expressions. Java fully specifies the (apparent) order of evaluation of expressions, for increased determinism and portability. Overloaded methods and constructors are resolved at compile time by picking the most specific method or constructor from those which are applicable. Java chooses which method or constructor by using the same basic algorithm used in languages with richer dispatching, such as Lisp's CLOS and Dylan, for the future.<p>
<a name="237592"></a>
Chapter 16 describes the precise way in which Java ensures that local variables are definitely set before use. While all other variables are automatically initialized to a default value, Java does not automatically initialize local variables in order to avoid masking programming errors.<p>
<a name="237601"></a>
Chapter 17 describes the semantics of Java threads and locks, which are based on the monitor-based concurrency originally introduced with the Mesa programming language. Java specifies a memory model for shared-memory multiprocessors that supports high-performance implementations.<p>
<a name="21132"></a>
Chapter 18 describes the facilities for automatically generating documentation from special comments in Java source code.<p>
<a name="21133"></a>
Chapter 19 presents a LALR(1) syntactic grammar for Java, and describes the differences between this grammar and the expository grammar used in the body of the language specification that precedes it.<p>
<a name="21134"></a>
Chapters 20 through 22 are the reference manual for the core of the standard Java Application Programming Interface. These packages must be included in all general purpose Java systems.<p>
<a name="21104"></a>
Chapter 20 describes the package <code>java.lang</code>. The types defined in <code>java.lang</code> are automatically imported to be available without qualification in all Java programs. They include the primordial class <code>Object</code>, which is a superclass of all other classes; classes such as <code>Integer</code> &#32;and <code>Float</code>, which wrap the primitive types inside objects; exceptions and errors defined by the language and the Java Virtual Machine; <code>Thread</code> support; metalinguistic classes such as <code>Class</code> and <code>ClassLoader</code>; and the class <code>System</code>, which abstracts the host system.<p>
<a name="11473"></a>
Chapter 21 describes the package <code>java.util</code>, which defines a few basic utility classes, such as a hashtable class and a pseudo-random number generator.<p>
<a name="11474"></a>
Chapter 22 describes the package <code>java.io</code>, which defines basic input/output facilities, including random access files and streams of values of primitive types.<p>
<a name="247825"></a>
The book concludes with an index, credits for quotations used in the book, and a colophon describing how the book was created.<p>
<a name="11484"></a>
<h2>1.1    Example Programs</h2>
<a name="11485"></a>
Most of the example programs given in the text are ready to be executed by a Java 
system and are similar in form to:
<p><pre><a name="11486"></a>
class Test {
<a name="44465"></a>	public static void main(String[] args) {
<a name="44467"></a>		for (int i = 0; i &lt; args.length; i++)
<a name="19064"></a>			System.out.print(i == 0 ? args[i] : " " + args[i]);
<a name="19080"></a>		System.out.println();
<a name="44477"></a>	}
<a name="44257"></a>}
</pre><a name="44479"></a>
On a Sun workstation, this class, stored in the file <code>Test.java</code>, can be compiled and executed by giving the commands:<p>
<pre><a name="11509"></a>
javac Test.java
<a name="11511"></a>java Test Hello, world.
</pre><a name="11515"></a>
producing the output:
<p><pre><a name="11516"></a>Hello, world.
</pre><a name="11506"></a>
<h2>1.2    References</h2>
<a name="159266"></a>
Apple Computer. <i>Dylan</i><i> Reference Manual. </i>Apple Computer Inc., Cupertino, California. September 29, 1995. See also <code>http://www.cambridge.apple.com</code>.<p>
<a name="40198"></a>
Bobrow, Daniel G., Linda G. DeMichiel, Richard P. Gabriel, Sonya E. Keene, Gregor Kiczales, &#32;and David A. Moon. <i>Common Lisp Object System Specification</i>, X3J13 Document 88-002R, June 1988; appears as Chapter 28 of Steele, Guy. <i>Common Lisp: The Language</i>, 2nd ed. Digital Press, 1990, ISBN 1-55558-041-6, 770-864.<p>
<a name="40207"></a>
Ellis, Margaret A., and Bjarne Stroustrup. <i>The Annotated </i><i>C++ Reference Manual</i>. Addison-Wesley, Reading, Massachusetts, 1990, reprinted with corrections October 1992, ISBN 0-201-51459-1.<p>
<a name="14948"></a>
Harbison, Samuel. <i>Modula-3</i>. Prentice Hall, Englewood Cliffs, New Jersey, 1992, ISBN 0-13-596396.<p>
<a name="11556"></a>
Hoare, C. A. R. <i>Hints on Programming Language Design. </i>Stanford University Computer Science Department Technical Report No. CS-73-403, December 1973. Reprinted in SIGACT/SIGPLAN Symposium on Principles of Programming Languages. Association for Computing Machinery, New York, October 1973.<p>
<a name="11558"></a>
<i>IEEE Standard for Binary Floating-Point Arithmetic</i>. ANSI/IEEE Std. 754-1985. Available from Global Engineering Documents, 15 Inverness Way East, Englewood, Colorado 80112-5704 USA; 800-854-7179.<p>
<a name="14939"></a>
Kernighan, Brian W., and Dennis M. Ritchie. <i>The </i><i>C Programming Language, </i>2nd ed. Prentice &#32;Hall, Englewood Cliffs, New Jersey, 1988, ISBN 0-13-110362-8.<p>
<a name="235648"></a>
Madsen, Ole Lehrmann, Birger M&oslash;ller-Pedersen, and Kristen Nygaard. <i>Object-Oriented Programming in the </i><i>Beta Programming Language</i>. Addison-Wesley, Reading, Massachusetts, 1993, ISBN 0-201-62430-3.<p>
<a name="159150"></a>
Mitchell, James G., William Maybury, and Richard Sweet. <i>The </i><i>Mesa Programming Language</i>, &#32;Version 5.0. Xerox PARC, Palo Alto, California, CSL 79-3, April 1979.<p>
<a name="14908"></a>
Stroustrup, Bjarne. <i>The C++ Progamming Language, </i>2nd ed. Addison-Wesley, Reading, Massachusetts, 1991, reprinted with corrections January 1994, ISBN 0-201-53992-6.<p>
<a name="235748"></a>
Unicode Consortium, The. <i>The Unicode Standard: Worldwide Character Encoding, Version &#32;1.0.</i> Addison-Wesley, Reading, Massachusetts, Volume 1, 1991, ISBN 0-201-56788-1, and Volume 2, 1992, ISBN 0-201-60845-6. (Version 2, forthcoming, 1996.)<p>


<hr>
<!-- This inserts footnotes--><p>
<a href="index.html">Contents</a> | <a href="j.preface.html">Prev</a> | <a href="2.doc.html">Next</a> | <a href="j.index.doc1.html">Index</a>
<p>
<font size=-1>Java Language Specification (HTML generated by Suzette Pelouch on February 24, 1998)<br>
<i><a href="jcopyright.doc.html">Copyright &#169 1996 Sun Microsystems, Inc.</a>
All rights reserved</i>
<br>
Please send any comments or corrections to <a href="mailto:doug.kramer@sun.com">doug.kramer@sun.com</a>
</font>
</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -