The Java Language Specification Third Edition James Gosling 2024 Scribd Download
The Java Language Specification Third Edition James Gosling 2024 Scribd Download
The Java Language Specification Third Edition James Gosling 2024 Scribd Download
https://ebookgate.com/product/the-java-language-specification-java-
se-8-edition-james-gosling-bill-joy-guy-l-steele/
ebookgate.com
https://ebookgate.com/product/volere-requirements-specification-
template-16th-edition-james-robertson/
ebookgate.com
https://ebookgate.com/product/java-2-micro-edition-java-in-small-
things-james-white/
ebookgate.com
https://ebookgate.com/product/developing-java-servlets-2nd-edition-
james-goodwill/
ebookgate.com
Algorithms in Java THIRD EDITION pdf Robert Sedgewick
https://ebookgate.com/product/algorithms-in-java-third-edition-pdf-
robert-sedgewick/
ebookgate.com
https://ebookgate.com/product/java-network-programming-third-edition-
elliotte-rusty-harold/
ebookgate.com
https://ebookgate.com/product/the-leadership-challenge-workbook-third-
edition-james-m-kouzes/
ebookgate.com
https://ebookgate.com/product/java-2-core-language-little-black-
book-1st-edition-alain-trottier/
ebookgate.com
https://ebookgate.com/product/persuasive-communication-third-edition-
james-b-stiff/
ebookgate.com
The Java™
Language Specification
Third Edition
The Java™ Series
ADDISON-WESLEY
Boston San Francisco New York Toronto Montreal
● ● ● ●
Sun Microsystems, Inc. (SUN) hereby grants to you a fully paid, nonexclusive, nontrans-
ferable, perpetual, worldwide limited license (without the right to sublicense) under
SUN’s intellectual property rights that are essential to practice this specification. This
license allows and is limited to the creation and distribution of clean room implementa-
tions of this specification that: (i) include a complete implementation of the current ver-
sion of this specification without subsetting or supersetting; (ii) implement all the
interfaces and functionality of the required packages of the Java™ 2 Platform, Standard
Edition, as defined by SUN, without subsetting or supersetting; (iii) do not add any addi-
tional packages, classes, or interfaces to the java.* or javax.* packages or their subpack-
ages; (iv) pass all test suites relating to the most recent published version of the
specification of the Java™ 2 Platform, Standard Edition, that are available from SUN six
(6) months prior to any beta release of the clean room implementation or upgrade thereto;
(v) do not derive from SUN source code or binary materials; and (vi) do not include any
SUN source code or binary materials without an appropriate and separate license from
SUN.
Sun, Sun Microsystems, the Sun logo, Solaris, Java, JavaScript, JDK, and all Java-based
trademarks or logos are trademarks or registered trademarks of Sun Microsystems, Inc.
UNIX® is a registered trademark of The Open Group in the United States and other coun-
tries. Apple and Dylan are trademarks of Apple Computer, Inc. All other product names
mentioned herein are the trademarks of their respective owners.
THIS PUBLICATION IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, OR NON-INFRINGEMENT.
THIS PUBLICATION COULD INCLUDE TECHNICAL INACCURACIES OR TYPO-
GRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFOR-
MATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW
EDITIONS OF THE PUBLICATION. SUN MICROSYSTEMS, INC. MAY MAKE
IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PRO-
GRAM(S) DESCRIBED IN THIS PUBLICATION AT ANY TIME.
Credits and permissions for quoted material appear in a separate section on page 649.
/
FT
RA
D
vi
FT
“When I use a word,” Humpty Dumpty said,
in rather a scornful tone, “it means just what I
choose it to mean—neither more nor less.”
“The question is,” said Alice, “whether you
can make words mean so many different things.”
“The question is,” said Humpty Dumpty,
“which is to be master—that’s all.”
RA
—Lewis Carroll, Through the Looking Glass
D
D
RA
FT
ix
Preface X X I I I
1 Introduction 1
1.1 Example Programs 5
1.2 Notation 6
1.3 Relationship to Predefined Classes and Interfaces 6
1.4 References 6
2 Grammars 9
2.1 Context-Free Grammars 9
2.2 The Lexical Grammar 9
2.3 The Syntactic Grammar 10
2.4 Grammar Notation 10
3 Lexical Structure 13
3.1 Unicode 13
3.2 Lexical Translations 14
3.3 Unicode Escapes 15
3.4 Line Terminators 16
3.5 Input Elements and Tokens 17
3.6 White Space 18
3.7 Comments 18
3.8 Identifiers 19
3.9 Keywords 21
3.10 Literals 21
3.10.1 Integer Literals 22
3.10.2 Floating-Point Literals 24
3.10.3 Boolean Literals 26
3.10.4 Character Literals 26
3.10.5 String Literals 28
3.10.6 Escape Sequences for Character and String Literals 30
3.10.7 The Null Literal 30
3.11 Separators 31
3.12 Operators 31
6 Names 113
6.1 Declarations 114
6.2 Names and Identifiers 115
6.3 Scope of a Declaration 117
6.3.1 Shadowing Declarations 119
6.3.2 Obscured Declarations 122
6.4 Members and Inheritance 122
6.4.1 The Members of Type Variables, Parameterized Types, Raw Types and
Intersection Types 122
6.4.2 The Members of a Package 122
6.4.3 The Members of a Class Type 123
6.4.4 The Members of an Interface Type 124
6.4.5 The Members of an Array Type 125
6.5 Determining the Meaning of a Name 126
6.5.1 Syntactic Classification of a Name According to Context 127
6.5.2 Reclassification of Contextually Ambiguous Names 129
6.5.3 Meaning of Package Names 131
6.5.3.1 Simple Package Names 131
6.5.3.2 Qualified Package Names 132
6.5.4 Meaning of PackageOrTypeNames 132
6.5.4.1 Simple PackageOrTypeNames 132
6.5.4.2 Qualified PackageOrTypeNames 132
6.5.5 Meaning of Type Names 132
6.5.5.1 Simple Type Names 132
6.5.5.2 Qualified Type Names 132
6.5.6 Meaning of Expression Names 134
6.5.6.1 Simple Expression Names 134
6.5.6.2 Qualified Expression Names 135
6.5.7 Meaning of Method Names 137
6.5.7.1 Simple Method Names 137
6.5.7.2 Qualified Method Names 137
6.6 Access Control 138
6.6.1 Determining Accessibility 138
6.6.2 Details on protected Access 139
6.6.2.1 Access to a protected Member 139
6.6.2.2 Qualified Access to a protected Constructor 140
6.6.3 An Example of Access Control 140
6.6.4 Example: Access to public and Non-public Classes 141
6.6.5 Example: Default-Access Fields, Methods, and Constructors 142
6.6.6 Example: public Fields, Methods, and Constructors 143
6.6.7 Example: protected Fields, Methods, and Constructors 143
6.6.8 Example: private Fields, Methods, and Constructors 144
The Java Language Specification
xii
6.7 Fully Qualified Names and Canonical Names 145
6.8 Naming Conventions 146
6.8.1 Package Names 147
6.8.2 Class and Interface Type Names 147
6.8.3 Type Variable Names 148
6.8.4 Method Names 149
6.8.5 Field Names 150
6.8.6 Constant Names 150
6.8.7 Local Variable and Parameter Names 151
7 Packages 153
7.1 Package Members 154
7.2 Host Support for Packages 155
7.2.1 Storing Packages in a File System 155
7.2.2 Storing Packages in a Database 157
7.3 Compilation Units 157
7.4 Package Declarations 158
7.4.1 Named Packages 158
7.4.1.1 Package Annotations 158
7.4.2 Unnamed Packages 159
7.4.3 Observability of a Package 160
7.4.4 Scope of a Package Declaration 160
7.5 Import Declarations 160
7.5.1 Single-Type-Import Declaration 161
7.5.2 Type-Import-on-Demand Declaration 163
7.5.3 Single Static Import Declaration 164
7.5.4 Static-Import-on-Demand Declaration 165
7.5.5 Automatic Imports 165
7.5.6 A Strange Example 165
7.6 Top Level Type Declarations 166
7.7 Unique Package Names 169
8 Classes 173
8.1 Class Declaration 175
8.1.1 Class Modifiers 175
8.1.1.1 abstract Classes 176
8.1.1.2 final Classes 178
8.1.1.3 strictfp Classes 178
8.1.2 Generic Classes and Type Parameters 178
8.1.3 Inner Classes and Enclosing Instances 181
8.1.4 Superclasses and Subclasses 184
8.1.5 Superinterfaces 186
8.1.6 Class Body and Member Declarations 189
8.2 Class Members 190
8.2.1 Examples of Inheritance 192
8.2.1.1 Example: Inheritance with Default Access 192
8.2.1.2 Inheritance with public and protected 193
xiii
8.2.1.3 Inheritance with private 193
8.2.1.4 Accessing Members of Inaccessible Classes 194
8.3 Field Declarations 196
8.3.1 Field Modifiers 197
8.3.1.1 static Fields 198
8.3.1.2 final Fields 199
8.3.1.3 transient Fields 199
8.3.1.4 volatile Fields 199
8.3.2 Initialization of Fields 201
8.3.2.1 Initializers for Class Variables 202
8.3.2.2 Initializers for Instance Variables 202
8.3.2.3 Restrictions on the use of Fields during Initialization 203
8.3.3 Examples of Field Declarations 205
8.3.3.1 Example: Hiding of Class Variables 205
8.3.3.2 Example: Hiding of Instance Variables 206
8.3.3.3 Example: Multiply Inherited Fields 207
8.3.3.4 Example: Re-inheritance of Fields 209
8.4 Method Declarations 209
8.4.1 Formal Parameters 210
8.4.2 Method Signature 212
8.4.3 Method Modifiers 214
8.4.3.1 abstract Methods 214
8.4.3.2 static Methods 216
8.4.3.3 final Methods 217
8.4.3.4 native Methods 218
8.4.3.5 strictfp Methods 218
8.4.3.6 synchronized Methods 218
8.4.4 Generic Methods 220
8.4.5 Method Return Type 220
8.4.6 Method Throws 221
8.4.7 Method Body 223
8.4.8 Inheritance, Overriding, and Hiding 224
8.4.8.1 Overriding (by Instance Methods) 224
8.4.8.2 Hiding (by Class Methods) 225
8.4.8.3 Requirements in Overriding and Hiding 225
8.4.8.4 Inheriting Methods with Override-Equivalent Signatures 228
8.4.9 Overloading 229
8.4.10 Examples of Method Declarations 230
8.4.10.1 Example: Overriding 230
8.4.10.2 Example: Overloading, Overriding, and Hiding 231
8.4.10.3 Example: Incorrect Overriding 231
8.4.10.4 Example: Overriding versus Hiding 232
8.4.10.5 Example: Invocation of Hidden Class Methods 234
8.4.10.6 Large Example of Overriding 234
8.4.10.7 Example: Incorrect Overriding because of Throws 236
8.5 Member Type Declarations 237
8.5.1 Modifiers 238
8.5.2 Static Member Type Declarations 238
The Java Language Specification
xiv
8.6 Instance Initializers 238
8.7 Static Initializers 239
8.8 Constructor Declarations 240
8.8.1 Formal Parameters and Formal Type Parameter 240
8.8.2 Constructor Signature 241
8.8.3 Constructor Modifiers 241
8.8.4 Generic Constructors 242
8.8.5 Constructor Throws 242
8.8.6 The Type of a Constructor 242
8.8.7 Constructor Body 242
8.8.7.1 Explicit Constructor Invocations 243
8.8.8 Constructor Overloading 246
8.8.9 Default Constructor 247
8.8.10 Preventing Instantiation of a Class 248
8.9 Enums 249
9 Interfaces 259
9.1 Interface Declarations 260
9.1.1 Interface Modifiers 260
9.1.1.1 abstract Interfaces 261
9.1.1.2 strictfp Interfaces 261
9.1.2 Generic Interfaces and Type Parameters 261
9.1.3 Superinterfaces and Subinterfaces 261
9.1.4 Interface Body and Member Declarations 263
9.1.5 Access to Interface Member Names 263
9.2 Interface Members 263
9.3 Field (Constant) Declarations 264
9.3.1 Initialization of Fields in Interfaces 265
9.3.2 Examples of Field Declarations 265
9.3.2.1 Ambiguous Inherited Fields 265
9.3.2.2 Multiply Inherited Fields 266
9.4 Abstract Method Declarations 266
9.4.1 Inheritance and Overriding 267
9.4.2 Overloading 268
9.4.3 Examples of Abstract Method Declarations 269
9.4.3.1 Example: Overriding 269
9.4.3.2 Example: Overloading 269
9.5 Member Type Declarations 270
9.6 Annotation Types 270
9.6.1 Predefined Annotation Types 277
9.6.1.1 Target 278
9.6.1.2 Retention 278
9.6.1.3 Inherited 279
9.6.1.4 Override 279
9.6.1.5 SuppressWarnings 280
9.6.1.6 Deprecated 280
9.7 Annotations 281
xv
10 Arrays 287
10.1 Array Types 288
10.2 Array Variables 288
10.3 Array Creation 289
10.4 Array Access 289
10.5 Arrays: A Simple Example 290
10.6 Array Initializers 290
10.7 Array Members 292
10.8 Class Objects for Arrays 293
10.9 An Array of Characters is Not a String 294
10.10 Array Store Exception 294
11 Exceptions 297
11.1 The Causes of Exceptions 298
11.2 Compile-Time Checking of Exceptions 299
11.2.1 Exception Analysis of Expressions 299
11.2.2 Exception Analysis of Statements 300
11.2.3 Exception Checking 301
11.2.4 Why Errors are Not Checked 301
11.2.5 Why Runtime Exceptions are Not Checked 301
11.3 Handling of an Exception 302
11.3.1 Exceptions are Precise 303
11.3.2 Handling Asynchronous Exceptions 303
11.4 An Example of Exceptions 304
11.5 The Exception Hierarchy 306
11.5.1 Loading and Linkage Errors 307
11.5.2 Virtual Machine Errors 307
12 Execution 309
12.1 Virtual Machine Start-Up 309
12.1.1 Load the Class Test 310
12.1.2 Link Test: Verify, Prepare, (Optionally) Resolve 310
12.1.3 Initialize Test: Execute Initializers 311
12.1.4 Invoke Test.main 312
12.2 Loading of Classes and Interfaces 312
12.2.1 The Loading Process 313
12.3 Linking of Classes and Interfaces 314
12.3.1 Verification of the Binary Representation 314
12.3.2 Preparation of a Class or Interface Type 315
12.3.3 Resolution of Symbolic References 315
12.4 Initialization of Classes and Interfaces 316
12.4.1 When Initialization Occurs 316
12.4.2 Detailed Initialization Procedure 319
12.4.3 Initialization: Implications for Code Generation 321
12.5 Creation of New Class Instances 322
12.6 Finalization of Class Instances 325
The Java Language Specification
xvi
12.6.1 Implementing Finalization 326
12.6.1.1 Interaction with the Memory Model 328
12.6.2 Finalizer Invocations are Not Ordered 329
12.7 Unloading of Classes and Interfaces 330
12.8 Program Exit 331
15 Expressions 409
15.1 Evaluation, Denotation, and Result 409
15.2 Variables as Values 410
15.3 Type of an Expression 410
15.4 FP-strict Expressions 411
15.5 Expressions and Run-Time Checks 411
15.6 Normal and Abrupt Completion of Evaluation 413
15.7 Evaluation Order 414
The Java Language Specification
xviii
15.7.1 Evaluate Left-Hand Operand First 415
15.7.2 Evaluate Operands before Operation 416
15.7.3 Evaluation Respects Parentheses and Precedence 417
15.7.4 Argument Lists are Evaluated Left-to-Right 418
15.7.5 Evaluation Order for Other Expressions 419
15.8 Primary Expressions 420
15.8.1 Lexical Literals 420
15.8.2 Class Literals 421
15.8.3 this 421
15.8.4 Qualified this 422
15.8.5 Parenthesized Expressions 422
15.9 Class Instance Creation Expressions 423
15.9.1 Determining the Class being Instantiated 424
15.9.2 Determining Enclosing Instances 425
15.9.3 Choosing the Constructor and its Arguments 427
15.9.4 Run-time Evaluation of Class Instance Creation Expressions 428
15.9.5 Anonymous Class Declarations 429
15.9.5.1 Anonymous Constructors 429
15.9.6 Example: Evaluation Order and Out-of-Memory Detection 430
15.10 Array Creation Expressions 431
15.10.1 Run-time Evaluation of Array Creation Expressions 432
15.10.2 Example: Array Creation Evaluation Order 433
15.10.3 Example: Array Creation and Out-of-Memory Detection 434
15.11 Field Access Expressions 435
15.11.1 Field Access Using a Primary 435
15.11.2 Accessing Superclass Members using super 438
15.12 Method Invocation Expressions 440
15.12.1 Compile-Time Step 1: Determine Class or Interface to Search 440
15.12.2 Compile-Time Step 2: Determine Method Signature 442
15.12.2.1 Identify Potentially Applicable Methods 443
15.12.2.2 Phase 1: Identify Matching Arity Methods Applicable by Sub-
typing 445
15.12.2.3 Phase 2: Identify Matching Arity Methods Applicable by
Method Invocation Conversion 446
15.12.2.4 Phase 3: Identify Applicable Variable Arity Methods 446
15.12.2.5 Choosing the Most Specific Method 447
15.12.2.6 Method Result and Throws Types 450
15.12.2.7 Inferring Type Arguments Based on Actual Arguments 451
15.12.2.8 Inferring Unresolved Type Arguments 466
15.12.2.9 Examples 466
15.12.2.10 Example: Overloading Ambiguity 468
15.12.2.11 Example: Return Type Not Considered 468
15.12.2.12 Example: Compile-Time Resolution 469
15.12.3 Compile-Time Step 3: Is the Chosen Method Appropriate? 471
15.12.4 Runtime Evaluation of Method Invocation 473
15.12.4.1 Compute Target Reference (If Necessary) 473
15.12.4.2 Evaluate Arguments 474
15.12.4.3 Check Accessibility of Type and Method 475
xix
15.12.4.4 Locate Method to Invoke 476
15.12.4.5 Create Frame, Synchronize, Transfer Control 477
15.12.4.6 Example: Target Reference and Static Methods 479
15.12.4.7 Example: Evaluation Order 479
15.12.4.8 Example: Overriding 480
15.12.4.9 Example: Method Invocation using super 481
15.13 Array Access Expressions 482
15.13.1 Runtime Evaluation of Array Access 483
15.13.2 Examples: Array Access Evaluation Order 483
15.14 Postfix Expressions 485
15.14.1 Expression Names 485
15.14.2 Postfix Increment Operator ++ 485
15.14.3 Postfix Decrement Operator -- 486
15.15 Unary Operators 487
15.15.1 Prefix Increment Operator ++ 487
15.15.2 Prefix Decrement Operator -- 488
15.15.3 Unary Plus Operator + 489
15.15.4 Unary Minus Operator - 489
15.15.5 Bitwise Complement Operator ~ 490
15.15.6 Logical Complement Operator ! 490
15.16 Cast Expressions 490
15.17 Multiplicative Operators 491
15.17.1 Multiplication Operator * 492
15.17.2 Division Operator / 493
15.17.3 Remainder Operator % 495
15.18 Additive Operators 496
15.18.1 String Concatenation Operator + 497
15.18.1.1 String Conversion 497
15.18.1.2 Optimization of String Concatenation 498
15.18.1.3 Examples of String Concatenation 498
15.18.2 Additive Operators (+ and -) for Numeric Types 500
15.19 Shift Operators 502
15.20 Relational Operators 503
15.20.1 Numerical Comparison Operators <, <=, >, and >= 503
15.20.2 Type Comparison Operator instanceof 504
15.21 Equality Operators 505
15.21.1 Numerical Equality Operators == and != 506
15.21.2 Boolean Equality Operators == and != 507
15.21.3 Reference Equality Operators == and != 507
15.22 Bitwise and Logical Operators 508
15.22.1 Integer Bitwise Operators &, ^, and | 508
15.22.2 Boolean Logical Operators &, ^, and | 508
15.23 Conditional-And Operator && 509
15.24 Conditional-Or Operator || 509
15.25 Conditional Operator ? : 510
15.26 Assignment Operators 512
15.26.1 Simple Assignment Operator = 513
15.26.2 Compound Assignment Operators 518
The Java Language Specification
xx
15.27 Expression 525
15.28 Constant Expression 525
18 Syntax 585
18.1 The Grammar of the Java Programming Language 585
Index 597
Credits 649
Colophon 651
The Java Language Specification
xxii
Preface
THE Java ™
programming language was originally called Oak, and was designed
FT
for use in embedded consumer-electronic applications by James Gosling. After
several years of experience with the language, and significant contributions by Ed
Frank, Patrick Naughton, Jonathan Payne, and Chris Warth it was retargeted to the
Internet, renamed, and substantially revised to be the language specified here. The
final form of the language was defined by James Gosling, Bill Joy, Guy Steele,
Richard Tuck, Frank Yellin, and Arthur van Hoff, with help from Graham Hamil-
ton, Tim Lindholm, and many other friends and colleagues.
The Java programming language is a general-purpose concurrent class-based
object-oriented programming language, specifically designed to have as few
RA
implementation dependencies as possible. It allows application developers to
write a program once and then be able to run it everywhere on the Internet.
This book attempts a complete specification of the syntax and semantics of
the language. We intend that the behavior of every language construct is specified
here, so that all implementations will accept the same programs. Except for timing
dependencies or other non-determinisms and given sufficient time and sufficient
memory space, a program written in the Java programming language should com-
pute the same result on all machines and in all implementations.
xxiii
PREFACE
We acknowledge and thank the many people who have contributed to this
book through their excellent feedback, assistance and encouragement:
Particularly thorough, careful, and thoughtful reviews of drafts were provided
by Tom Cargill, Peter Deutsch, Paul Hilfinger, Masayuki Ida, David Moon, Steven
Muchnick, Charles L. Perkins, Chris Van Wyk, Steve Vinoski, Philip Wadler,
Daniel Weinreb, and Kenneth Zadeck. We are very grateful for their extraordinary
volunteer efforts.
We are also grateful for reviews, questions, comments, and suggestions from
Stephen Adams, Bowen Alpern, Glenn Ammons, Leonid Arbuzov, Kim Bruce,
FT
Edwin Chan, David Chase, Pavel Curtis, Drew Dean, William Dietz, David Dill,
Patrick Dussud, Ed Felten, John Giannandrea, John Gilmore, Charles Gust,
Warren Harris, Lee Hasiuk, Mike Hendrickson, Mark Hill, Urs Hoelzle, Roger
Hoover, Susan Flynn Hummel, Christopher Jang, Mick Jordan, Mukesh Kacker,
Peter Kessler, James Larus, Derek Lieber, Bill McKeeman, Steve Naroff,
Evi Nemeth, Robert O’Callahan, Dave Papay, Craig Partridge, Scott Pfeffer,
Eric Raymond, Jim Roskind, Jim Russell, William Scherlis, Edith Schonberg,
Anthony Scian, Matthew Self, Janice Shepherd, Kathy Stark, Barbara Steele, Rob
Strom, William Waite, Greg Weeks, and Bob Wilson. (This list was generated
semi-automatically from our E-mail records. We apologize if we have omitted
RA
anyone.)
The feedback from all these reviewers was invaluable to us in improving the
definition of the language as well as the form of the presentation in this book. We
thank them for their diligence. Any remaining errors in this book—we hope they
are few—are our responsibility and not theirs.
We thank Francesca Freedman and Doug Kramer for assistance with matters
of typography and layout. We thank Dan Mills of Adobe Systems Incorporated for
assistance in exploring possible choices of typefaces.
Many of our colleagues at Sun Microsystems have helped us in one way or
another. Lisa Friendly, our series editor, managed our relationship with Addison-
Wesley. Susan Stambaugh managed the distribution of many hundreds of copies
D
xxiv
PREFACE
was invaluable to us during the process of researching and verifying many of the
quotations that are scattered throughout this book. Here is one example:
They lard their lean books with the fat of others’ works.
—Robert Burton (1576–1640)
We are grateful to those who have toiled on Project Bartleby, for saving us a great
deal of effort and reawakening our appreciation for the works of Walt Whitman.
We are thankful for the tools and services we had at our disposal in writing
this book: telephones, overnight delivery, desktop workstations, laser printers,
FT
photocopiers, text formatting and page layout software, fonts, electronic mail, the
World Wide Web, and, of course, the Internet. We live in three different states,
scattered across a continent, but collaboration with each other and with our
reviewers has seemed almost effortless. Kudos to the thousands of people who
have worked over the years to make these excellent tools and services work
quickly and reliably.
Mike Hendrickson, Katie Duffy, Simone Payment, and Rosa Aimée González
of Addison-Wesley were very helpful, encouraging, and patient during the long
process of bringing this book to print. We also thank the copy editors.
Rosemary Simpson worked hard, on a very tight schedule, to create the index.
RA
We got into the act at the last minute, however; blame us and not her for any jokes
you may find hidden therein.
Finally, we are grateful to our families and friends for their love and support
during this last, crazy, year.
James Gosling
D
Cupertino, California
Bill Joy
Aspen, Colorado
Guy Steele
Chelmsford, Massachusetts
July, 1996
xxv
D
RA
FT
Preface to the Second Edition
FT
the organism must evolve or perish.
Alan Perlis, Foreword to Structure and Interpretation of Computer Programs
RA
OVER the past few years, the Java ™ programming language has enjoyed
unprecedented success. This success has brought a challenge: along with explo-
sive growth in popularity, there has been explosive growth in the demands made
on the language and its libraries. To meet this challenge, the language has grown
as well (fortunately, not explosively) and so have the libraries.
This second edition of The Java™ Language Specification reflects these devel-
opments. It integrates all the changes made to the Java programming language
since the publication of the first edition in 1996. The bulk of these changes were
made in the 1.1 release of the Java platform in 1997, and revolve around the addi-
D
xxvii
PREFACE TO THE SECOND EDITION
The specifications of the libraries are now far too large to fit into this volume,
and they continue to evolve. Consequently, API specifications have been removed
from this book. The library specifications can be found on the java.sun.com
Web site (see below); this specification now concentrates solely on the Java pro-
gramming language proper.
Readers may send comments on this specification to: [email protected]. To
learn the latest about the Java 2 platform, or to download the latest Java 2 SDK
release, visit http://java.sun.com. Updated information about the Java Series,
including errata for The Java™ Language Specification, Second Edition, and pre-
FT
views of forthcoming books, may be found at http://java.sun.com/Series.
Many people contributed to this book, directly and indirectly. Tim Lindholm
brought extraordinary dedication to his role as technical editor. He also made
invaluable technical contributions, especially on floating-point issues. The book
would likely not see the light of day without him. Lisa Friendly, the Series editor,
provided encouragement and advice for which I am very thankful.
David Bowen first suggested that I get involved in the specifications of the
Java platform. I am grateful to him for introducing me to this uncommonly rich
area.
John Rose, the father of nested types in the Java programming language, has
RA
been unfailingly gracious and supportive of my attempts to specify them accu-
rately.
Many people have provided valuable comments on this edition. Special
thanks go to Roly Perera at Ergnosis and to Leonid Arbouzov and his colleagues
on Sun’s Java platform conformance team in Novosibirsk: Konstantin Bobrovsky,
Natalia Golovleva, Vladimir Ivanov, Alexei Kaigorodov, Serguei Katkov, Dmitri
Khukhro, Eugene Latkin, Ilya Neverov, Pavel Ozhdikhin, Igor Pyankov,
Viatcheslav Rybalov, Serguei Samoilidi, Maxim Sokolnikov, and Vitaly Tchaiko.
Their thorough reading of earlier drafts has greatly improved the accuracy of this
specification.
I am indebted to Martin Odersky and to Andrew Bennett and the members of
D
Sun’s javac compiler team, past and present: Iris Garcia, Bill Maddox, David
Stoutamire, and Todd Turnidge. They all worked hard to make sure the reference
implementation conformed to the specification. For many enjoyable technical
exchanges, I thank them and my other colleagues at Sun: Lars Bak, Joshua Bloch,
Cliff Click, Robert Field, Mohammad Gharahgouzloo, Ben Gomes, Steffen
Grarup, Robert Griesemer, Graham Hamilton, Gordon Hirsch, Peter Kessler,
Sheng Liang, James McIlree, Philip Milne, Srdjan Mitrovic, Anand Palaniswamy,
Mike Paleczny, Mark Reinhold, Kenneth Russell, Rene Schmidt, David Ungar,
Chris Vick, and Hong Zhang.
xxviii
PREFACE TO THE SECOND EDITION
FT
Suzette Pelouch provided invaluable assistance with the index and, together
with Doug Kramer and Atul Dambalkar, assisted with FrameMaker expertise;
Mike Hendrickson and Julie Dinicola at Addison-Wesley were gracious, helpful
and ultimately made this book a reality.
On a personal note, I thank my wife Weihong for her love and support.
Finally, I’d like to thank my coauthors, James Gosling, Bill Joy, and Guy
Steele for inviting me to participate in this work. It has been a pleasure and a priv-
ilege.
Gilad Bracha
RA
Los Altos, California
April, 2000
D
xxix
D
RA
FT
Preface to the Third Edition
FT
This edition of the Java ™ Programming Language Specification represents the
largest set of changes in the language’s history. Generics, annotations, asserts,
autoboxing and unboxing, enum types, foreach loops, variable arity methods and
static imports have all been added to the language recently. All but asserts are new
to the 5.0 release of autumn 2004.
This third edition of The Java™ Language Specification reflects these develop-
ments. It integrates all the changes made to the Java programming language since
RA
the publication of the second edition in 2000.
The language has grown a great deal in these past four years. Unfortunately, it
is unrealistic to shrink a commercially successful programming language - only to
grow it more and more. The challenge of managing this growth under the con-
straints of compatibility and the conflicting demands of a wide variety of uses and
users is non-trivial. I can only hope that we have met this challenge successfully
with this specification; time will tell.
Readers may send comments on this specification to: [email protected]. To
learn the latest about the Java platform, or to download the latest J2SE release,
visit http://java.sun.com. Updated information about the Java Series, includ-
ing errata for The Java™ Language Specification, Third Edition, and previews of
D
xxxi
PREFACE TO THE THIRD EDITION
deserves more credit for this version of the language than he - but any blame for
its deficiencies should be directed at myself and the members of the many JSR
expert groups!
Neal has gone on in search of new challenges, and has been succeeded by
Peter von der Ahé, who continues to improve and stengthen the implementation.
Before Neal’s involvement, Bill Maddox was in charge of javac when the previous
edition was completed, and he nursed features such as generics and asserts
through their early days.
Another individual who deserves to be singled out is Joshua Bloch. Josh par-
FT
ticipated in endless language design discussions, chaired several expert groups
and was a key contributor to the Java platform. It is fair to say that Josh and Neal
care more about this book than I do myself!
Many parts of the specification were developed by various expert groups in
the framework of the Java community process.
The most pervasive set of language changes is the result of JSR-014: Adding
Generics to the Java Programming Language. The members of the JSR-014
expert group were: Norman Cohen, Christian Kemper, Martin Odersky, Kresten
Krab Thorup, Philip Wadler and myself. In the early stages, Sven-Eric Panitz and
Steve Marx were members as well. All deserve thanks for their participation.
RA
JSR-014 represents an unprecedented effort to fundamentally extend the type
system of a widely used programming language under very stringent compatibil-
ity requirements. A prolonged and arduous process of design and implementation
led us to the current language extension. Long before the JSR for generics was ini-
tiated, Martin Odersky and Philip Wadler had created an experimental language
called Pizza to explore the ideas involved. In the spring of 1998, David Stoutamire
and myself began a collaboration with Martin and Phil based on those ideas, that
resulted in GJ. When the JSR-014 expert group was convened, GJ was chosen as
the basis for extending the Java programming language. Martin Odersky imple-
mented the GJ compiler, and his implementation became the basis for javac (start-
ing with JDK 1.3, even though generics were disabled until 1.5).
D
The theoretical basis for the core of the generic type system owes a great debt
to the expertise of Martin Odersky and Phil Wadler. Later, the system was
extended with wildcards. These were based on the work of Atsushi Igarashi and
Mirko Viroli, which itself built on earlier work by Kresten Thorup and Mads
Torgersen. Wildcards were initially designed and implemented as part of a collab-
oration between Sun and Aarhus University. Neal Gafter and myself participated
on Sun’s behalf, and Erik Ernst and Mads Torgersen, together with Peter von der
Ahé and Christian Plesner-Hansen, represented Aarhus. Thanks to Ole Lehrmann-
Madsen for enabling and supporting that work.
xxxii
PREFACE TO THE THIRD EDITION
Joe Darcy and Ken Russell implemented much of the specific support for
reflection of generics. Neal Gafter, Josh Bloch and Mark Reinhold did a huge
amount of work generifying the JDK libraries.
Honorable mention must go to individuals whose comments on the generics
design made a significant difference. Alan Jeffrey made crucial contributions to
JSR-14 by pointing out subtle flaws in the original type system. Bob Deen sug-
gested the “? super T” syntax for lower bounded wildcards
JSR-201 included a series of changes: autoboxing, enums, foreach loops, vari-
able arity methods and static import. The members of the JSR-201 expert group
FT
were: Cédric Beust, David Biesack, Joshua Bloch (co-chair), Corky Cartwright,
Jim des Rivieres, David Flanagan, Christian Kemper, Doug Lea, Changshin Lee,
Tim Peierls, Michel Trudeau and myself (co-chair). Enums and the foreach loop
were primarily designed by Josh Bloch and Neal Gafter. Variable arity methods
would never have made it into the language without Neal’s special efforts design-
ing them (not to mention the small matter of implementing them).
Josh Bloch bravely took upon himself the responsibility for JSR-175, which
added annotations to the language. The members of JSR-175 expert group were
Cédric Beust, Joshua Bloch (chair), Ted Farrell, Mike French, Gregor Kiczales,
Doug Lea, Deeptendu Majunder, Simon Nash, Ted Neward, Roly Perera, Manfred
RA
Schneider, Blake Stone and Josh Street. Neal Gafter, as usual, was a major con-
tributer on this front as well.
Another change in this edition is a complete revision of the Java memory
model, undertaken by JSR-133. The members of the JSR-133 expert group were
Hans Boehm, Doug Lea, Tim Lindholm (co-chair), Bill Pugh (co-chair), Martin
Trotter and Jerry Schwarz. The primary technical authors of the memory model
are Sarita Adve, Jeremy Manson and Bill Pugh. The Java memory model chapter
in this book is in fact almost entirely their work, with only editorial revisions.
Joseph Bowbeer, David Holmes, Victor Luchangco and Jan-Willem Maessen
made significant contributions as well. Key sections dealing with finalization in
chapter 12 owe much to this work as well, and especially to Doug Lea.
D
xxxiii
PREFACE TO THE THIRD EDITION
Special thanks to Laurie Tolson, my manager, for her support throughout the
long process of deriving these specifications.
The following individuals all provided many valuable comments that have
contributed to this specification: Scott Annanian, Martin Bravenboer, Bruce Chap-
man, Lawrence Gonsalves, Tim Hanson, David Holmes, Angelika Langer, Pat
Lavarre, Phillipe Mulet and Cal Varnson.
Ann Sellers, Greg Doench and John Fuller at Addison-Wesley were exceed-
ingly patient and ensured that the book materialized, despite the many missed
deadlines for this text.
FT
As always, I thank my wife Weihong and my son Teva for their support and
cooperation.
Gilad Bracha
Los Altos, California
January, 2005
RA
D
xxxiv
C H A P T E R 1
Introduction
FT
1.0 If I have seen further it is by standing upon the shoulders of Giants.
—
details of the machine representation are not available through the language. It
includes automatic storage management, typically using a garbage collector, to
avoid the safety problems of explicit deallocation (as in C’s free or C++’s
delete). High-performance garbage-collected implementations can have
bounded pauses to support systems programming and real-time applications. The
language does not include any unsafe constructs, such as array accesses without
index checking, since such unsafe constructs would cause a program to behave in
an unspecified way.
The Java programming language is normally compiled to the bytecoded
instruction set and binary format defined in The Java™ Virtual Machine Specifica-
tion, Second Edition (Addison-Wesley, 1999).
1
1 Introduction INTRODUCTION
FT
The primitive types are defined to be the same on all machines and in all
implementations, and are various sizes of two’s-complement integers, single- and
double-precision IEEE 754 standard floating-point numbers, a boolean type, and
a Unicode character char type. Values of the primitive types do not share state.
Reference types are the class types, the interface types, and the array types.
The reference types are implemented by dynamically created objects that are
either instances of classes or arrays. Many references to each object can exist. All
objects (including arrays) support the methods of the class Object, which is the
(single) root of the class hierarchy. A predefined String class supports Unicode
character strings. Classes exist for wrapping primitive values inside of objects. In
RA
many cases, wrapping and unwrapping is performed automatically by the com-
piler (in which case, wrapping is called boxing, and unwrapping is called unbox-
ing). Class and interface declarations may be generic, that is, they may be
parameterized by other reference types. Such declarations may then be invoked
with specific type arguments.
Variables are typed storage locations. A variable of a primitive type holds a
value of that exact primitive type. A variable of a class type can hold a null refer-
ence or a reference to an object whose type is that class type or any subclass of
that class type. A variable of an interface type can hold a null reference or a refer-
ence to an instance of any class that implements the interface. A variable of an
array type can hold a null reference or a reference to an array. A variable of class
D
type Object can hold a null reference or a reference to any object, whether class
instance or array.
Chapter 5 describes conversions and numeric promotions. Conversions
change the compile-time type and, sometimes, the value of an expression. These
conversions include the boxing and unboxing conversions between primitive types
and reference types. Numeric promotions are used to convert the operands of a
numeric operator to a common type where an operation can be performed. There
are no loopholes in the language; casts on reference types are checked at run time
to ensure type safety.
Chapter 6 describes declarations and names, and how to determine what
names mean (denote). The language does not require types or their members to be
2
INTRODUCTION Introduction 1
declared before they are used. Declaration order is significant only for local vari-
ables, local classes, and the order of initializers of fields in a class or interface.
The Java programming language provides control over the scope of names
and supports limitations on external access to members of packages, classes, and
interfaces. This helps in writing large programs by distinguishing the implementa-
tion of a type from its users and those who extend it. Recommended naming con-
ventions that make for more readable programs are described here.
Chapter 7 describes the structure of a program, which is organized into pack-
ages similar to the modules of Modula. The members of a package are classes,
FT
interfaces, and subpackages. Packages are divided into compilation units. Compi-
lation units contain type declarations and can import types from other packages to
give them short names. Packages have names in a hierarchical name space, and
the Internet domain name system can usually be used to form unique package
names.
Chapter 8 describes classes. The members of classes are classes, interfaces,
fields (variables) and methods. Class variables exist once per class. Class methods
operate without reference to a specific object. Instance variables are dynamically
created in objects that are instances of classes. Instance methods are invoked on
instances of classes; such instances become the current object this during their
RA
execution, supporting the object-oriented programming style.
Classes support single implementation inheritance, in which the implementa-
tion of each class is derived from that of a single superclass, and ultimately from
the class Object. Variables of a class type can reference an instance of that class
or of any subclass of that class, allowing new types to be used with existing meth-
ods, polymorphically.
Classes support concurrent programming with synchronized methods.
Methods declare the checked exceptions that can arise from their execution, which
allows compile-time checking to ensure that exceptional conditions are handled.
Objects can declare a finalize method that will be invoked before the objects
are discarded by the garbage collector, allowing the objects to clean up their state.
D
For simplicity, the language has neither declaration “headers” separate from
the implementation of a class nor separate type and class hierarchies.
A special form of classes, enums, support the definition of small sets of values
and their manipulation in a type safe manner. Unlike enumerations in other lan-
guages, enums are objects and may have their own methods.
Chapter 9 describes interface types, which declare a set of abstract methods,
member types, and constants. Classes that are otherwise unrelated can implement
the same interface type. A variable of an interface type can contain a reference to
any object that implements the interface. Multiple interface inheritance is sup-
ported.
3
1 Introduction INTRODUCTION
FT
of exceptions: checked exceptions, run-time exceptions, and errors. The compiler
ensures that checked exceptions are properly handled by requiring that a method
or constructor can result in a checked exception only if the method or constructor
declares it. This provides compile-time checking that exception handlers exist,
and aids programming in the large. Most user-defined exceptions should be
checked exceptions. Invalid operations in the program detected by the Java virtual
machine result in run-time exceptions, such as NullPointerException. Errors
result from failures detected by the virtual machine, such as OutOfMemoryError.
Most simple programs do not try to handle errors.
Chapter 12 describes activities that occur during execution of a program. A
RA
program is normally stored as binary files representing compiled classes and inter-
faces. These binary files can be loaded into a Java virtual machine, linked to other
classes and interfaces, and initialized.
After initialization, class methods and class variables may be used. Some
classes may be instantiated to create new objects of the class type. Objects that are
class instances also contain an instance of each superclass of the class, and object
creation involves recursive creation of these superclass instances.
When an object is no longer referenced, it may be reclaimed by the garbage
collector. If an object declares a finalizer, the finalizer is executed before the
object is reclaimed to give the object a last chance to clean up resources that
would not otherwise be released. When a class is no longer needed, it may be
D
unloaded.
Chapter 13 describes binary compatibility, specifying the impact of changes
to types on other types that use the changed types but have not been recompiled.
These considerations are of interest to developers of types that are to be widely
distributed, in a continuing series of versions, often through the Internet. Good
program development environments automatically recompile dependent code
whenever a type is changed, so most programmers need not be concerned about
these details.
Chapter 14 describes blocks and statements, which are based on C and C++.
The language has no goto statement, but includes labeled break and continue
statements. Unlike C, the Java programming language requires boolean (or
4
INTRODUCTION Example Programs 1.1
FT
Chapter 16 describes the precise way in which the language ensures that local
variables are definitely set before use. While all other variables are automatically
initialized to a default value, the Java programming language does not automati-
cally initialize local variables in order to avoid masking programming errors.
Chapter 17 describes the semantics of threads and locks, which are based on
the monitor-based concurrency originally introduced with the Mesa programming
language. The Java programming language specifies a memory model for shared-
memory multiprocessors that supports high-performance implementations.
Chapter 18 presents a syntactic grammar for the language.
The book concludes with an index, credits for quotations used in the book,
RA
and a colophon describing how the book was created.
Most of the example programs given in the text are ready to be executed and are
similar in form to:
class Test {
public static void main(String[] args) {
for (int i = 0; i < args.length; i++)
System.out.print(i == 0 ? args[i] : " " + args[i]);
System.out.println();
D
}
}
On a Sun workstation using Sun’s Java 2 Platform Standard Edition Develp-
ment Kit software, this class, stored in the file Test.java, can be compiled and
executed by giving the commands:
javac Test.java
java Test Hello, world.
producing the output:
Hello, world.
5
1.2 Notation INTRODUCTION
1.2 Notation
Throughout this book we refer to classes and interfaces drawn from the Java and
Java 2 platforms. Whenever we refer to a class or interface which is not defined in
an example in this book using a single identifier N, the intended reference is to the
class or interface named N in the package java.lang. We use the canonical name
(§6.7) for classes or interfaces from packages other than java.lang.
Whenever we refer to the The Java™ Virtual Machine Specification in this
book, we mean the second edition, as amended by JSR 924.
FT
1.3 Relationship to Predefined Classes and Interfaces
As noted above, this specification often refers to classes of the Java and Java 2
platforms. In particular, some classes have a special relationship with the Java
programming language. Examples include classes such as Object, Class,
ClassLoader, String, Thread, and the classes and interfaces in package
java.lang.reflect, among others. The language definition constrains the
behavior of these classes and interfaces, but this document does not provide a
RA
complete specification for them. The reader is referred to other parts of the Java
platform specification for such detailed API specifications.
Thus this document does not describe reflection in any detail. Many linguistic
constructs have analogues in the reflection API, but these are generally not dis-
cussed here. So, for example, when we list the ways in which an object can be cre-
ated, we generally do not include the ways in which the reflective API can
accomplish this. Readers should be aware of these additional mechanisms even
though they are not mentioned in this text.
D
1.4 References
Apple Computer. Dylan™ Reference Manual. Apple Computer Inc., Cupertino, California.
September 29, 1995. See also http://www.cambridge.apple.com.
Bobrow, Daniel G., Linda G. DeMichiel, Richard P. Gabriel, Sonya E. Keene, Gregor
Kiczales, and David A. Moon. Common Lisp Object System Specification, X3J13
Document 88-002R, June 1988; appears as Chapter 28 of Steele, Guy. Common Lisp:
The Language, 2nd ed. Digital Press, 1990, ISBN 1-55558-041-6, 770–864.
Ellis, Margaret A., and Bjarne Stroustrup. The Annotated C++ Reference Manual.
Addison-Wesley, Reading, Massachusetts, 1990, reprinted with corrections October
1992, ISBN 0-201-51459-1.
6
INTRODUCTION References 1.4
FT
rado 80112-5704 USA; 800-854-7179.
Kernighan, Brian W., and Dennis M. Ritchie. The C Programming Language, 2nd ed.
Prentice Hall, Englewood Cliffs, New Jersey, 1988, ISBN 0-13-110362-8.
Madsen, Ole Lehrmann, Birger Møller-Pedersen, and Kristen Nygaard. Object-Oriented
Programming in the Beta Programming Language. Addison-Wesley, Reading, Mas-
sachusetts, 1993, ISBN 0-201-62430-3.
Mitchell, James G., William Maybury, and Richard Sweet. The Mesa Programming
Language, Version 5.0. Xerox PARC, Palo Alto, California, CSL 79-3, April 1979.
Stroustrup, Bjarne. The C++ Progamming Language, 2nd ed. Addison-Wesley, Reading,
RA
Massachusetts, 1991, reprinted with corrections January 1994, ISBN 0-201-53992-6.
Unicode Consortium, The. The Unicode Standard: Worldwide Character Encoding, Ver-
sion 1.0, Volume 1, ISBN 0-201-56788-1, and Volume 2, ISBN 0-201-60845-6.
Updates and additions necessary to bring the Unicode Standard up to version 1.1 may
be found at http://www.unicode.org.
Unicode Consortium, The. The Unicode Standard, Version 2.0, ISBN 0-201-48345-9.
Updates and additions necessary to bring the Unicode Standard up to version 2.1 may
be found at http://www.unicode.org.
Unicode Consortium, The. The Unicode Standard, Version 4.0, ISBN 0-321-18578-1.
Updates and additions may be found at http://www.unicode.org.
D
7
1.4 References INTRODUCTION
FT
RA
D
8
C H A P T E R 2
Grammars
FT
Grammar, which knows how to control even kings . . .
—
A lexical grammar for the Java programming language is given in (§3). This
grammar has as its terminal symbols the characters of the Unicode character set. It
defines a set of productions, starting from the goal symbol Input (§3.5), that
describe how sequences of Unicode characters (§3.1) are translated into a
sequence of input elements (§3.5).
These input elements, with white space (§3.6) and comments (§3.7) dis-
carded, form the terminal symbols for the syntactic grammar for the Java pro-
gramming language and are called tokens (§3.5). These tokens are the identifiers
9
2.3 The Syntactic Grammar GRAMMARS
(§3.8), keywords (§3.9), literals (§3.10), separators (§3.11), and operators (§3.12)
of the Java programming language.
The syntactic grammar for the Java programming language is given in Chapters 4,
6–10, 14, and 15. This grammar has tokens defined by the lexical grammar as its
terminal symbols. It defines a set of productions, starting from the goal symbol
CompilationUnit (§7.3), that describe how sequences of tokens can form syntacti-
FT
cally correct programs.
Terminal symbols are shown in fixed width font in the productions of the lexical
and syntactic grammars, and throughout this specification whenever the text is
directly referring to such a terminal symbol. These are to appear in a program
exactly as written.
RA
Nonterminal symbols are shown in italic type. The definition of a nonterminal
is introduced by the name of the nonterminal being defined followed by a colon.
One or more alternative right-hand sides for the nonterminal then follow on suc-
ceeding lines. For example, the syntactic definition:
IfThenStatement:
if ( Expression ) Statement
states that the nonterminal IfThenStatement represents the token if, followed by a
left parenthesis token, followed by an Expression, followed by a right parenthesis
token, followed by a Statement.
As another example, the syntactic definition:
D
ArgumentList:
Argument
ArgumentList , Argument
states that an ArgumentList may represent either a single Argument or an
ArgumentList, followed by a comma, followed by an Argument. This definition of
ArgumentList is recursive, that is to say, it is defined in terms of itself. The result
is that an ArgumentList may contain any positive number of arguments. Such
recursive definitions of nonterminals are common.
The subscripted suffix “opt”, which may appear after a terminal or nontermi-
nal, indicates an optional symbol. The alternative containing the optional symbol
10
GRAMMARS Grammar Notation 2.4
actually specifies two right-hand sides, one that omits the optional element and
one that includes it.
This means that:
BreakStatement:
break Identifieropt ;
FT
break Identifier ;
and that:
BasicForStatement:
for ( ForInitopt ; Expressionopt ; ForUpdateopt ) Statement
11
Random documents with unrelated
content Scribd suggests to you:
indent their shores, and they are so connected by rivers that almost
continuous canoeing for scores of miles is sometimes practicable, with only
occasionally a mile or two of portage. In connection with such a multitude of
lakes there are some very interesting geological facts.
In the Muskoka region there are more than one hundred hotels, from the
Royal Muskoka, accommodating three hundred guests, to those of the
simplest, yet entirely comfortable order that can receive only fifteen or
twenty guests with prices often as low as six dollars a week. The month of
September in the Muskoka Lakes is particularly delightful. It is estimated
that there is an annual transient summer population of not less than thirty
thousand every year of people from both the States and the Dominion. Many
of the romantic islands in the lakes are owned by wealthy people who have
built charming summer villas upon them. There are between four and five
hundred of these islands, the largest of which consists of over eleven
hundred acres, and on many of which any one is at liberty to build. The
generous attitude of the Ontario Government is always a fact with which to
reckon. There are very beautiful places in this Muskoka district: the "River
of Shadows" (apparently a subterranean forest, so perfectly is every leaf and
branch mirrored in the water), the Moon River, and the Falls of Bala. It is of
the strange, wild beauty of Muskoka that Lampman wrote:
All these Highlands of Ontario are a part of the vast Laurentian range and
they are characterised by a singular type of rugged and stately beauty. They
are densely wooded; and the luxuriant maples in all their golden-green, that
wonderfully vivid emerald with a hint of gold caught from the sunshine in
the summer, and their brilliant scarlet and amber in the early autumn; the
fragrant balsams; the giant hemlocks; the tall pines that almost lead one to
question George Eliot's assertion that "Care is taken that the trees do not
grow into the sky," for the Canadian pine seems almost to pierce the sky—
all this marvel of forest, with the shining lakes and sunlit glades, renders the
Highlands of Ontario one of the wonders of the world. From Buffalo and
Toronto to North Bay on Lake Nipissing, this entire region is traversed by
the Grand Trunk System carrying summer wanderers through this
enchanting scenery—hills, and lofty peaks, and woods, variegated with the
silver expanse of lakes and flowing rivers; and if, perchance, one is
travelling by night, it is rather delightful to raise the heavy curtain of the
large window of a Pullman sleeper and watch the stars, and the sky, and the
often weird effects of chiaroscuro. They not unfrequently suggest artistic
creations. By night or by day it is all a spellbinding land, the celestial
heavens glittering by night, the sunshine flooding the world with
illumination by day; and silver mists, and ethereal shadows lurk in the deep
pinewoods. To the initiate there are magic guides in all these haunts, unseen
save of him who hath the "spirit-gifted eyes." The light of all the
constellations that have ever looked down on earth since the morning-stars
sang together is in these Canadian skies. For always is it true that
Not only the romance of Canada, but the tangible realities of her prosperity
are disclosed to the eye of the traveller. Farms in a high state of cultivation;
comfortable, alluring farmhouses, with their lawns, and gardens, and
parterres of flowers, and a rustic seat here and there are in continual
evidence. The refinements of life, from the neatness and grace of rural
homes to the beautiful little railway stations with their attractive architecture,
their plots of greenery, their brilliant beds of flowers, are impressive to the
onlooker, and do more to convey to travellers a true concept of the character
of the Canadian people than can be fully estimated. The gratification of one's
sense of beauty in these charming little way stations along the route adds
immeasurably to the enjoyment of the journey.
Then, too, what can be said of that sail among the thirty thousand islands
in the Georgian Bay? In colour and idyllic charm this sail rivals the famous
cruise among the Ionian Islands:
and all the summer resorts of this region, Minnecoganashene, Sans Souci,
Rose Point, and various nooks of verdant charm are peopled by their
summer lovers.
The Great Lakes, shared alike by the Dominion and the States, offer a
delightful cruise between Sarnia (Ontario) and Duluth (Minnesota) with calls
at Fort William and Port Arthur, and a further excursion to the Falls of
Kakabeka, a cascade higher than that of Niagara, which are near Port Arthur.
Lake Nipissing and the French River are attractive grounds for the
camper and the canoeist; but they are not suited to the "tenderfoot." It is
amazing that a region which can be reached with ease is yet so absolutely a
place where the lover of Nature in her wild solitudes can absolutely secure a
vacation from relentless Time! In the Lake Nipissing land he may elude the
postman and the telephone. Doubtless by 1920, some invading airship will
drop a voluminous mail at his feet when he is out in his canoe; but at the
present time the sojourner here is immune from cables, telegrams,
Marconigrams, long-distance telephones, special deliveries, messenger boys,
and all this incubus of what we call civilisation. If radiograms fall upon him
they must needs come from the solar system alone. Emerson, even in the
prehistoric period of the nineteenth century, declared solitude a thing
impossible to find.
"When I would spend a lonely day
Sun and moon are in my way,"
he complains. The lingerer camping out on the French River has no green-
shaded electric reading-lamp at his elbow; no electric bell summons his
servitor. He "catches" his breakfast in the deep waters of the lake; he
concocts his matutinal coffee over a camp-fire. No ingenious victrola
enchants his evening with the lyric melody of Melba or Caruso; but instead,
the strange cry of the loon echoes startlingly through the silences. And so it
falls out that the hardy devotees of the chase and the camp hail this region as
their El Dorado.
Jasper Park is, however, not filled with game as is Algonquin. It is said
that a century ago it teemed with bear, mink, beaver, elk, and caribou—but
since that time the resident Indians have devastated the animal life; and
when they learned that the Dominion was about to take over the entire tract
for a permanent reservation, they embarked upon a wholesale slaughter of
the animals. The Park is now made by Government decree a safe and
friendly region for the wild game, and it is thus confidently hoped to
gradually increase the animal life of the preserve.
The steel highway has brought this Alpine region, on the western border
of Alberta, into easy and swift connection with the travelling world. Already
the Grand Trunk Pacific is projecting hotels of the same exceptional
character as those with which Algonquin Park is so well provided. At present
there is the unique feature of a "tent city," which renders a sojourn of any
length one that is entirely comfortable and provisioned with the amenities of
life. It is one to rather enhance, indeed, the ordinary experiences of travel.
The sleeping tents (as separate as rooms in an hotel) are all fitted with board
floors and are equipped with comfortable beds and every convenience. There
is a large central marquee for the dining-room, and all this comfort, to say
nothing of glories of scenery undreamed of, is offered at the almost nominal
rate of two and a half dollars a day. The town site commands a magnificent
view of Athabasca Valley. The Athabasca river expands, at intervals, into
lakes, of which Brule Lake, Jasper Lake, and Fish Lake are notable. At the
juncture of the Athabasca and the Maligne rivers stood formerly the
headquarters of the North-Western Fur Company; while the old Jasper
House, the Hudson's Bay Company's post, now in ruins, was in close
proximity. The site is now defined only by a pile of stones and by several
graves, with mouldering crosses, that suggest the close of the drama of
earthly life for those who lived and toiled here, unconsciously aiding to build
up the future. The very atmosphere is pervaded by a sense of heroic effort.
One of the delightful excursions for sylvan wanderers is that of the trail to
Maligne Lake, a beautiful sheet of water some thirty miles distant; and in
Maligne Canyon, only eight miles from Jasper, are two comfortable shelter-
houses for the free use of all tourists; each house divided into three parts,
with one large room for ladies, one for gentlemen, and a central hall fitted
with a range and other conveniences, where impromptu cooking may be
conducted with successful results. These shelter-houses provide one more
illustration of the way in which the tourist is safe-guarded all over the
Dominion, even in what would seem her most impenetrable localities. So
swiftly are modern conditions of comfort on their winged way that the
refinements of life fairly spring up in the wilderness and almost every
conceivable need or requirement of the traveller is anticipated.
The beauty of Banff and Lake Louise is already known to the tourist, but
it is, rather especially, the wonderful region opened to travel by the
extensions of the Grand Trunk System that is so unusually spellbinding. The
grandeur of these majestic mountain-peaks; the valleys and plateaus amid
the gleam of lake and river; the brilliant foliage; the rich scheme of colour of
purple and vermilion cliffs; the glint of blue waters through overarching
trees—Ah! Land of the Maple Leaf, how fair is thy heritage!
CHAPTER VI
The famous Cobalt Silver Mines naturally focus the interest of the
capitalist and the financier in any tour across the great Dominion. While
British Columbia and the Yukon have been called the "Wonderland" of
Canada, not alone for their mineral possibilities, but for a great wealth of
other natural resources besides, and because many millions of dollars have
been extracted by placer miners from rivers and streams, yet Ontario is
found to exceed all other provinces, so far as yet developed, in the volume of
mineral production. The Klondyke gold discoveries in the Canadian Yukon
became a romance which has fairly rivalled the Tale of the Golden Fleece.
Yet when in the year 1903 the copious and apparently unmeasurable deposits
of silver-cobalt ores containing an extraordinarily high percentage of silver
were discovered in the district of Cobalt (not far to the west from Lake
Temiskaming), this event sent a thrill of sensation through the world of
mining and mineral interests that left little to exceed, in romantic ardour, in
the poetic legends of the Yukon:
In some of the Cobalt mines the ores that contained such phenomenal
quantities of silver have been depleted, and ores of lower grade are now
being worked, so that a much larger mass of ore, more machinery, and a
larger force of working-men are now required to produce the same amount
of silver.
During the present war all enterprises are, more or less, and, indeed,
largely, in abeyance in the Dominion; but the present is always compact of
the future, nor can any strictly dividing line be drawn. "Even in the midst of
the greatest tragedies," said Sir Clifford Sifton in his address before the
Canadian Club of Montreal on January 25, 1915, "while we are trying to do
our duty in the greatest crisis of life, we still must speak, act, think, and do in
reference to the ordinary affairs of life; and the better we think and act and
do in regard to these affairs, the better we shall act in these crises and the
better we shall discharge our duty." Canada will never be numbered with
those nations regarding whom the words were said of old, "Where there is
no vision the people perish."
This is the spirit of the Dominion. But all conflicts must have an end, and
when the end of this struggle comes there is a marvellous future awaiting the
Dominion. The future of a nation as well as that of an individual is not
merely, nor even mostly, to be mechanically surveyed. It is not a definite
geographical region with boundaries that can be located and crossed with a
clear knowledge of the line of demarcation. The future is something that is
created by men's thoughts. It is made, not found; it is constructed, not
discovered. And thus, even while all internal industries are somewhat in the
grasp of an enforced pause, yet new plans and projects for the future are in
order. The mineral resources of Canada are incalculable. But that they will
form one of the most remarkable factors in her future prosperity and
importance is a practicable certainty.
When the Cobalt silver mines began to be worked, Canada took her place
as the third silver-producing country in the world; and this distinction must
be largely attributed to the richness and copious output of these particular
veins.
The vast mills of Cobalt, transforming the crude ore into bullion, and the
hydraulic plant on the top of a hill, where one man manipulates power
sufficient to wash down huge rocks and to uproot and send down large trees
and stumps, open out to the uninitiate a new idea of the way in which man
contrives to control Nature and force her to do his bidding.
At Cobalt the "silver sidewalk" is not only an actual and visible spectacle,
a solid surface on the level ground of shining silver from one to three feet in
extent, but it is an indication of untold possibilities. Still, up to this time, the
richness of the veins has been found to be rather in their number than their
depth. These deposits are found in association with the pre-Cambrian rocks
which, according to the geologists, belong to the Huronian and the Keewatin
formations, through which a later diabase has been intruded in the form of a
sill. This is not held to be necessarily the source of the ore deposits, but
rather the means of opening the way for their introduction from other
sources. A large majority of the productive veins, some eighty per cent., in
fact, occur solely in the Huronian formation. The remaining twenty per cent.
is divided between the Keewatin and the later diabase. As has been said
above, these deposits are not especially deep, most of them being found
below the sill within a depth of two hundred feet. The ores from all the
Cobalt region include white arsenic, cobalt oxide, and nickel oxide, as well
as the fine silver, and not infrequently a semi-refined mixture of the cobalt
and nickel oxides.
If silver were the magnet that first drew the attention of the miner, the
prospector, or the capitalist to Cobalt, it is not the only encouragement to the
settlement of all this beautiful region. A few miles out from Cobalt is the
pretty suburb of New Liskeard on a sheet of the bluest water, sparkling in the
sunshine and the transparent air; where numbers of artistically designed
cottages have sprung up; where the business street reveals a thriving trade;
where one or two newspapers are published; and where the seeker after the
occult may find his palmist and his mental healer as well as his dentist and
his physician. Electric cars connect this idyllic little village with Cobalt, and
motor cars dart about in a way which suggests that this region is by no
means outside of the cosmopolitan luxuries of life. The country is one of
great scientific interest. The geologist may find new data; the botanist and
ornithologist new fields for observation.
During the year 1915 thirteen mines in Northern Ontario produced gold,
and many of these are now making alterations and additions to their plants
which will enable them to largely increase their output.
The following table shows the steady advance of the Porcupine gold
camp since its discovery in 1910:—
Value of
Year Production
$
1910 35,539
1911 17,187
1912 1,730,628
1913 4,284,928
1914 5,203,229
1915 7,580,766
----------
Total 18,852,277
To descend into a mine, down to a three hundred and fifty feet level, and
see the strange panorama of life that is before one's eyes, is a novel
experience. Into the cage steps the little party, and the downward journey
begins. All is dark save for the lamps of the miners, affixed to their caps, and
the lights that are swung give a fitful and weird illumination. Through the
narrow aisles on every level push-carts are passing, and the visitor must pack
himself into as little space as possible as he stands against the wall to let the
traffic pass by. Everything is dripping; one walks in mud and water, and sees
the glisten of the wet walls. The air is cold and damp. It seems inconceivable
that men can work under such conditions, yet the visitor is assured by some
of the workmen themselves that they prefer this labour to any of the
employments open to them on the surface of the earth. This subterranean
world incites curiosity, interest, and still the onlooker is not sorry when he
finds himself again in the air and sunlight above.
On the hills about Cobalt are perched attractive cottages and bungalows,
and the quiet, pleasantly social little town bears no trace of the traditional
atmosphere of the mining-camp of that peculiar order that has been most
vividly derived from the pictures in the novels of Bret Harte.
CHAPTER VII
From the tower of the Fort Garry Hotel there is revealed a scene hardly to
be compared with any other on the continent. The spectator can see broad
boulevards, many of which are a hundred and thirty-two feet in width; an
electric railway, operating hundreds of cars, whose service is said to be the
most perfect of that of any city in the States or in Canada; streets paved with
asphalt and macadam; extensive parks, where equipages not less fine than
those of Hyde Park or the Bois de Boulogne, are seen rolling along the
smooth, winding roads; churches, numbering nearly two hundred; the
University of Manitoba; the art school; and the unexcelled beauty of miles of
residential regions, laid out in those graceful curves and crescents so familiar
in the West End of London—all these are indicated in this great centre of
commercial, industrial, and social life.
A signal aim in this city is the culture of beauty. In the laying out of
streets and avenues the question of vista and the composition, so to speak, of
the landscape has received unfailing consideration. All the country about is
finely wooded, and with its rolling declivities offers cool and shaded nooks
and spaces for summer outings. Here and there are lofty elms, and
occasional wooded areas of many acres in extent. These are a surprise to the
traveller whose conceptions of this region have been those of a bare and
more or less desolate prairie land. The nature of the soil of the
neighbourhood is a factor of determining importance. The clay belt begins at
Cochrane, the junction of the Transcontinental line with the Ontario
Government Railway, and it extends for three hundred miles to the west,
affording a tract with plentiful water and with every productive condition.
The provision of population for this clay belt is now a foremost question in
Canada and engages the attention of both the Province of Ontario and of the
Transcontinental Railway. The generation that cleared the bush lands has
almost passed away, and the present settlers have different ideas of pioneer
life. One age does not repeat itself. The continual invention of machinery
that liberates human life has its dominating influence, and all signs of the
times point to new methods of entering on new settlements. The British
settlers who arrive are not accustomed to the clearing of timber-lands, yet
this clay belt has probably resources to sustain a population of from one to
two million people, and the climate is no more severe than that of Quebec or
of northern Maine. The transformation of this region of wilderness into a
well-populated country would provide a much-needed link between Eastern
and Western Canada. The distances, as we have seen, between Winnipeg and
other of the great centres both in the Dominion and in the United States are
by no means appalling; and with the splendid railway facilities now provided
by the new Trans-continental route between Winnipeg, Toronto, and
Montreal, by way of Cochrane, Cobalt, and North Bay, across New Ontario,
and through the Highlands of the same Province, a route that only opened on
July 13, 1915, this region is abounding in attractions for the new settler.
There are two sources of revenue which are of unmeasured value; one is
that of pulpwood which can be advantageously disposed of, and the other
that of employment in constructing government roads. Another inducement
will be that of the "ready-made farm." This scheme has been utilised to some
extent in Alberta and in New Brunswick as an inducement to colonists.
Thousands of these farms, on which buildings have been erected and a small
area placed under cultivation, with stock and farming implements furnished,
have been placed at the disposal of settlers, each for a small cash payment,
and with the conditions of subsequent payments made most liberal and
lenient. In Ontario the scheme has not yet been worked out in detail; but the
government of the Province is favourable toward adopting a similar system,
building a house and barn and clearing ten acres on a farm of a hundred and
sixty acres, as well as advancing a limited sum of money for the purchase of
stock. The Ontario government also propose arrangements for assisting the
farmer in marketing his pulpwood.
Winnipeg, since 1899, has owned and operated its own water system,
which is the hydro-electric power plant. The architecture is largely of a
permanent nature, the designs following the latest developments of taste,
skill, and efficient construction. Much of it compares favourably with the
best architecture of New York or Washington. The blocks of handsome
residences; the architectural taste of the public buildings; and the constant
series of lawns, with their flowers and plants, leafy shrubs and luxuriant
trees, make the city one of exceeding beauty and attractiveness. Churches,
schools (and they are among the best in Canada), theatres, and lecture halls
abound; the libraries are particularly enlightened and helpful and their
growth and extension are only comparable with the library developments of
St. Paul and Minneapolis, of Los Angeles and other young cities of the most
advanced degrees of progress. "The world of books is still the world," wrote
Mrs. Browning; and the community that renews its resources from the best
that has been thought and said in the world, as it is conserved in literature,
will be that which is the more efficient in all that makes for human
advancement. Familiarity with the best literature has the most potent of
influences for good taste, good manners, high ideals of conduct, mutual
courtesy, and self-respect.
Mr. Arnold hastens to disclaim any sympathy with the idea that young
men should not emigrate; it was the term "interesting" that caught his eye in
Carlyle's counsel, and it is for that element that he makes his eloquent plea.
It is that element, moreover, which the young and splendid city of Winnipeg
may well reckon as one of its fundamental characteristics. In the Journal
Intime of M. Amiel, the reader finds him saying that "the human heart is, as
it were, haunted by confused reminiscences of an age of gold; or, rather, by
aspirations toward a harmony of things which every-day reality denies to
us." In all the appointments of wealth and luxury, M. Amiel made an effort
to realise or to approach this ideal, and thus finds in this order of life one
form of poetry. Society demands distinction and beauty as a component part
of human nature's daily food.
It is not only noble art and beautiful architecture combined with historic
and social traditions that appeal to all that is best in life. What could more
readily appeal to the imagination than that visible expression of faith in the
future of the Great Dominion, the completion of a new great transcontinental
line making possible direct transit across Canada from ocean to ocean? What
could more appeal to the imagination than the marvellous invention of the
wireless control of moving trains as has been already described in a previous
chapter?
From the windows and balconies of the Fort Garry Hotel the view is
magnificent—St. Boniface, with its splendid cathedral group, Assiniboine
Park, and the Legislative Buildings, with two rivers winding away into the
vast spaces of the prairie—all make up a panorama never to be forgotten.
The interior of this alluring house is singularly charming to the eye. The
furnishings are rich and yet have that air of simplicity that appeals to the
artistic sense—grey marble floors with soft rugs and the main dining-room
all in cream and gold. The foyer and loggia connecting the banquet and ball
rooms suggest the ancient cloister with their vaulted ceilings and the
mediæval lanterns for electric lights. The café has marble wainscoting,
suggestive of some old baronial castle, while in the grillroom there is oak
panelling that would delight old England. There are three hundred rooms,
two hundred and thirty-five of which have private baths while the others
have easy access to bathrooms. What a contrast of living is thus revealed
between the fastidious and luxurious life of the twentieth century and that of
the primitive days of a hundred years ago when the old Fort Garry occupied
the site of this hotel!
For fully fifty miles west of Winnipeg extends a belt of land some 300
miles in width, provided with good water found at reasonable depths, which
is the marvel of the world for grain raising. This Red River Valley is the
great wheat-producing region of the continent, and the journey of nearly
eight hundred miles from Winnipeg to Edmonton reveals vast fields of
golden grain, while along the route the colossal elevators loom up in the
level expanse like some colossal fortifications.
The capitol is four stories in height, with classic portico and a dome
surmounted by a tall lantern, while the building is rendered still more
beautiful by its artistic approach; wide terraced steps, with balustrades,
ornamented with heavy bronze lamps, the effect of which, when lighted at
night, is not without reminiscences of Paris. The Hotel Macdonald has a
charming situation on the high bank of the river, within a few minutes' walk
of the centre of the town. The traveller enters by the spacious court and
covered loggia, passing thence into the great rotunda, with its floor of pink
Levantine marble and its ceiling of solid oak. Adjoining this is a lounge,
opening on a terrace 50 feet wide, overlooking the river, and the palm-room
(octagonal in form, with its dome decorated in Wedgwood designs), as well
as a beautiful dining-room, a café, and other public rooms. As one walks
through all this magnificence in the place so recently occupied by Indians,
hunters, and trappers of the frontier trading posts, he begins to realise
something of that almost incredible rapidity of growth and development that
characterises the great North-West.
Mrs. Murphy is the wife of the Rev. Arthur Murphy, D.D., who at one
time was the chaplain to the Empress Frederick. Her work has attracted
much attention in England, and The Bookman of London, in a critical review
of her books extending into several pages, said:
"The work of 'Janey Canuck' has the optimism of the true lyric; the song of the
open road. The refrain of the windswept spaces was never set to a better tune.... It
is not style that matters in the work of 'Janey Canuck' any more than it matters in
the work of Walt Whitman—a kindred philosopher. She comes scattering seeds of
gladness in our mist, and lo! our gloom is gone like a black cloud that breaks
before the April sun. She is the philosopher of gladness and content and common
sense, a philosophy as durable as Bergsonism."
Mrs. Murphy has been honoured by King George by the decoration that
entitles her to be known as a "Lady of Grace," an appropriate title, indeed,
for so gracious a lady.
Edmonton is the gateway to the Yellowhead Pass; and the beauty of its
location, the charming nature of its people, and the vastness of the territory
of which it is naturally the centre, all conspire to incite dream and prophecy
of the future of this young city of University ideals and marked intellectual
and literary quality.
CHAPTER VIII
One of the most enchanting pleasure trips that can be enjoyed on the
North American continent is that from Winnipeg to Prince Rupert through
regions of scenic glory
It is only some five hours from Edmonton before one begins to enter on
this wonderland of romance. It is so new that the world of travel has not yet
realised the marvel and glory of this trip. When it is stated that even the first
surveying for this transcontinental line began only in 1910, it will be readily
seen that in this region is opened up an absolutely new part of the world to
general travel. The anomaly of traversing these primeval wilds in a train so
luxuriously appointed as are the limiteds on the Grand Trunk Pacific appeals
to the comprehension of man's conquest over nature. To travel in the comfort
of these commodious coaches, equipped with a richly-furnished drawing-
room, an admirable dining-car, an observation car with a spacious balcony
platform at the rear and fitted with writing-desks, stationery in abundance,
books, magazines, and newspapers, is to enjoy a journey on a flying hotel.
"Here is a train worth while!" wrote Sir Arthur Conan Doyle after the
conclusion of the extensive trip that he and Lady Conan Doyle enjoyed over
the Dominion: "it is the latest word in comfort, in luxury, in safety, in speed.
The dining-car is never taken off. The observation car is a pleasant club. The
road is as smooth as polished marble, with heavy rails well ballasted, no
smoke or cinders.... It has the highest maintenance of track and rolling
stock.... It runs on a marvellous line, destined to a mighty future."
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookgate.com