Index

Symbols

= operator, 582

assignment contexts, 109

expressions and run-time checks, 463, 464

normal and abrupt completion of evaluation, 465, 465

@Deprecated, 306

@FunctionalInterface, 308

@Inherited, 304

@Override, 304

@Repeatable, 308

repeatable annotation types, 298

@Retention, 303

repeatable annotation types, 298

@SafeVarargs, 307

formal parameters, 228

@SuppressWarnings, 305

checked casts and unchecked casts, 121

formal parameters, 228

requirements in overriding and hiding, 246

unchecked conversion, 103

@Target, 302

multiple annotations of the same type, 318

repeatable annotation types, 298

where annotations may appear, 313

A

abrupt completion of do statement, 425

do statement, 425

abrupt completion of for statement, 428

iteration of for statement, 428

abrupt completion of while statement, 424

while statement, 423

abstract classes, 192, 383

abstract methods, 232

anonymous class declarations, 485

array creation expressions, 487

final classes, 194

superinterfaces, 204

abstract interfaces, 279

abstract methods, 232, 396

abstract classes, 192

method body, 240

method declarations, 286

access control, 161

accessing superclass members using super, 498

class literals, 474

class modifiers, 191

constructor declarations, 256

default constructor, 265

enum body declarations, 269

explicit constructor invocations, 262

field access using a primary, 495

identify potentially applicable methods, 509

import declarations, 180

interface modifiers, 278

local class declarations, 407

member type declarations, 254

method declarations, 286

normal annotations, 309

objects, 54

qualified expression names, 158, 158, 158

qualified type names, 156, 156

reference types and values, 53

requirements in overriding and hiding, 247

single-static-import declarations, 184

single-type-import declarations, 181

static-import-on-demand declarations, 184

superclasses and subclasses, 200

superinterfaces, 202

superinterfaces and subinterfaces, 280

type-import-on-demand declarations, 183

access to a protected member, 167

access to members and constructors, 387

accessing superclass members using super, 497

declarations, 132

field declarations, 213

field initialization, 221, 222

initialization of fields in interfaces, 285

instance initializers, 255

static methods, 234

syntactic classification of a name according to context, 150

actions, 640

synchronization order, 642

additive operators, 556

constant expressions, 605

integer operations, 43

additive operators (+ and -) for numeric types, 559

binary numeric promotion, 126

floating-point operations, 48

an array of characters is not a String, 339

annotation type elements, 293

@Target, 303

annotation types, 293

declarations, 130, 131, 131

marker annotations, 311

normal annotations, 309

single-element annotations, 312

syntactic classification of a name according to context, 150

where types are used, 76

annotation types, 292

@Target, 302

annotations, 308

declarations, 130

interface declarations, 278

annotations, 308

declarations, 132

defaults for annotation type elements, 297

syntactic classification of a name according to context, 150

anonymous class declarations, 485

class instance creation expressions, 477, 477

class modifiers, 191

definite assignment and anonymous classes, 627

enum constants, 268

form of a binary, 377

initialization of fields in interfaces, 285

inner classes and enclosing instances, 197

syntactic classification of a name according to context, 151

where types are used, 76, 77

anonymous constructors, 485

choosing the constructor and its arguments, 484

default constructor, 265

form of a binary, 381

argument lists are evaluated left-to-right, 470

array access, 332

array access expressions, 491

array access, 332

assignment operators, 582

compound assignment operators, 589

simple assignment operator =, 582

syntactic classification of a name according to context, 151

unary numeric promotion, 125

array creation, 332

array creation and access expressions, 487

method reference expressions, 529

array creation expressions, 487

array creation, 332

array initializers, 335

objects, 53

syntactic classification of a name according to context, 151

unary numeric promotion, 125

where types are used, 76, 78

array initializers, 335

array creation, 332

definite assignment and array initializers, 626

normal and abrupt completion of evaluation, 464

objects, 53

run-time evaluation of array creation expressions, 488

array members, 336

declarations, 130, 130

happens-before order, 644

qualified expression names, 159

array store exception, 333

array variables, 332

assignment contexts, 109

expressions and run-time checks, 463, 464

normal and abrupt completion of evaluation, 465

variables, 80

array types, 330

annotation type elements, 294

enhanced for statement, 430

raw types, 66

reference types and values, 52

reifiable types, 65

where types are used, 77

array variables, 330

enhanced for statement, 431

formal parameters, 228

lambda parameters, 598

arrays, 329

array creation expressions, 487

kinds of variables, 83

when reference types are the same, 57

assert statement, 416

assert statements, 620

detailed initialization procedure, 365

when initialization occurs, 361

assert statements, 620

assignment contexts, 107

array initializers, 335

array store exception, 333

array variables, 332

class instance creation expressions, 478

execution of try-catch, 444

expressions and run-time checks, 463, 463

kinds of types and values, 42

lambda expressions, 595

method invocation expressions, 500

method reference expressions, 531

normal annotations, 310

reference conditional expressions, 580

return statement, 436

run-time evaluation of method references, 540

simple assignment operator =, 582, 583

switch statement, 420

throw statement, 437, 438

type of an expression, 461

variables, 80

assignment expressions, 615

assignment operators, 581

assignment contexts, 107

assignment expressions, 615

evaluation order for other expressions, 471

field initialization, 221

final variables, 86

forms of expressions, 460

initial values of variables, 87

syntactic classification of a name according to context, 151

variables, 80

asynchronous Exceptions, 343

causes of Exceptions, 343

B

basic for statement, 426

@Target, 303

for statements, 622

scope of a declaration, 140

syntactic classification of a name according to context, 150

where types are used, 76

basic try-with-resources, 448

binary compatibility, 375

binary numeric promotion, 125

additive operators (+ and -) for numeric types, 559

division operator /, 552

integer bitwise operators &, ^, and |, 568

multiplicative operators, 550

numeric conditional expressions, 580

numeric contexts, 124

numerical comparison operators <, <=, >, and >=, 563

numerical equality operators == and !=, 566

postfix decrement operator --, 544

postfix increment operator ++, 543

prefix decrement operator --, 547

prefix increment operator ++, 546

remainder operator %, 554

shift operators, 561

bitwise and logical operators, 568

constant expressions, 605

bitwise complement operator ~, 548

constant expressions, 605

integer operations, 43

unary numeric promotion, 125

blocks, 407, 617

blocks, 617

kinds of variables, 84

lambda body, 599

local class declarations, 407

scope of a declaration, 140

blocks and statements, 405

boolean conditional expressions, 579

boolean constant expressions, 613

boolean equality operators == and !=, 567

boolean type and boolean values, 51

boolean literals, 34

boolean type and boolean values, 51

boxing conversion, 101

constant expressions, 605

identifiers, 23

lexical literals, 473

boolean logical operators &, ^, and |, 569

boolean type and boolean values, 51

conditional-and operator &&, 570

conditional-or operator ||, 570

boolean type and boolean values, 51

boolean literals, 34

lexical literals, 473

bounds, 661

bounds involving capture conversion, 675

invocation applicability inference, 678

more specific method inference, 686

reduction, 663

bounds involving capture conversion, 674

incorporation, 673

boxing conversion, 100

assignment contexts, 107

casting contexts, 115

class literals, 473

conditional operator ? :, 579

creation of new class instances, 366

floating-point operations, 49

integer operations, 44

invocation contexts, 113

invocation type inference, 680

normal and abrupt completion of evaluation, 465

numeric conditional expressions, 579

objects, 53

postfix decrement operator --, 544

postfix increment operator ++, 543

prefix decrement operator --, 547

prefix increment operator ++, 546

type compatibility constraints, 668, 668

break statement, 432

break, continue, return, and throw statements, 624

labeled statements, 413

names and identifiers, 137

normal and abrupt completion of statements, 406

break, continue, return, and throw statements, 624

C

capture conversion, 103

array access expressions, 491

assignment operators, 582

bounds, 662

cast expressions, 549

compile-time declaration of a method reference, 533, 534

compile-time step 3: is the chosen method appropriate?, 520

enhanced for statement, 430

expression compatibility constraints, 667, 667

field access using a primary, 495

function types, 325

intersection types, 70

least upper bound, 75

members and constructors of parameterized types, 63

parameterized types, 59

qualified expression names, 158, 158, 158, 159, 159

reference conditional expressions, 580

resolution, 676

simple expression names, 157

subtyping among class and interface types, 72

type arguments of parameterized types, 61

type of a method reference, 538

cast expressions, 549

array types, 330

casting contexts, 114

compile-time step 3: is the chosen method appropriate?, 519

constant expressions, 605

expressions and run-time checks, 463, 464

floating-point operations, 48

forms of expressions, 460

happens-before order, 644

integer operations, 43

intersection types, 70

normal and abrupt completion of evaluation, 465

objects, 54

syntactic classification of a name according to context, 151

type comparison operator instanceof, 564

unary operators, 544

where types are used, 76

casting contexts, 114

boolean type and boolean values, 51

cast expressions, 549, 550

expressions and run-time checks, 463, 464

happens-before order, 644

kinds of types and values, 42

lambda expressions, 595

method reference expressions, 531

objects, 54

reference equality operators == and !=, 567

casting conversions to primitive types, 116

casting conversions to reference types, 117

causes of Exceptions, 343

character literals, 34

boxing conversion, 101

comments, 22

constant expressions, 605

escape sequences for character and String literals, 37

lexical literals, 473

unicode, 16

check accessibility of type and method, 523

run-time evaluation of method references, 540, 540, 541

checked casts and unchecked casts, 121

variables of reference type, 81

checked casts at run time, 122

checked casts and unchecked casts, 122

checked exception constraints, 671

choosing the constructor and its arguments, 481

anonymous constructors, 486

class instance creation expressions, 478

compile-time declaration of a method reference, 533

default constructor, 265

expression compatibility constraints, 664

formal parameters, 257

choosing the most specific method, 514

compile-time declaration of a method reference, 534, 535, 535

compile-time step 2: determine method Signature, 504

conditional operator ? :, 572, 573

method and constructor overloading, 399

more specific method inference, 686, 686

phase 1: identify matching arity methods applicable by strict invocation, 512

phase 2: identify matching arity methods applicable by loose invocation, 513

phase 3: identify methods applicable by variable arity invocation, 513

class body and member declarations, 205, 386

class members, 206

member type declarations, 254, 254

scope of a declaration, 140

what binary compatibility is and is not, 382

class declarations, 191

declarations, 130

reference types and values, 52

types, classes, and interfaces, 88

class instance creation expressions, 476

conditional operator ? :, 572, 573

constructor declarations, 256, 256

constructor overloading, 264

creation of new class instances, 365

exception analysis of expressions, 346

form of a binary, 379

forms of expressions, 460

functional interfaces, 319

initial values of variables, 87, 87

instance initializers, 255

invocation contexts, 112

invocation type inference, 681

kinds of variables, 84

method reference expressions, 529

names and identifiers, 138

objects, 53, 53

return statement, 436

run-time handling of an exception, 350

String conversion, 106

syntactic classification of a name according to context, 151, 151, 151

types, classes, and interfaces, 88

where types are used, 76, 76, 77, 77

class literals, 473

declarations, 132

normal annotations, 310

syntactic classification of a name according to context, 150

class loading, 356

causes of Exceptions, 343

class literals, 474

load the class test, 354

class members, 206

abstract classes, 192

declarations, 130

function types, 323

members and constructors of parameterized types, 63

method invocation type, 516

class modifiers, 191

@Target, 302

anonymous class declarations, 485

local class declarations, 407

reference type casting, 118, 118, 118

class Object, 55

checked casts at run time, 122, 123

method invocation type, 517

class objects for arrays, 338

types, classes, and interfaces, 88

class String, 56

lexical literals, 473

literals, 24

objects, 53

String literals, 35, 36

class type parameters, 385

classes, 189

local class declarations, 407

package members, 173

qualified expression names, 158

reclassification of contextually ambiguous names, 153

top level type declarations, 185

comments, 21

input elements and tokens, 20

lexical grammar, 9

lexical translations, 16

line terminators, 19

unicode, 16

compilation units, 177

determining accessibility, 162

host support for packages, 175

observability of a package, 179

package members, 173

reclassification of contextually ambiguous names, 153, 153

scope of a declaration, 139

shadowing, 146

syntactic grammar, 10

compile-time checking of Exceptions, 344

checked exception constraints, 671

compile-time declaration of a method reference, 532

checked exception constraints, 672

choosing the most specific method, 515

compile-time step 2: determine method Signature, 503

expression compatibility constraints, 666, 667

identify potentially applicable methods, 510

invocation type inference, 683, 683

method reference expressions, 531

phase 1: identify matching arity methods applicable by strict invocation, 511

run-time evaluation of method references, 541

compile-time step 1: determine class or interface to search, 500

class Object, 56

compile-time declaration of a method reference, 532

identify potentially applicable methods, 509

method invocation type, 517

raw types, 68

compile-time step 2: determine method Signature, 502

choosing the constructor and its arguments, 483, 483

compile-time declaration of a method reference, 532

enum constants, 268

overloading, 251

what binary compatibility is and is not, 382

compile-time step 3: is the chosen method appropriate?, 517

check accessibility of type and method, 523

choosing the most specific method, 515

create frame, synchronize, transfer control, 528

form of a binary, 379

locate method to invoke, 524, 524

method invocation expressions, 499

run-time evaluation of method references, 540, 541, 542

complementary pairs of bounds, 674

incorporation, 673

compound assignment operators, 588

evaluate left-hand operand first, 466

compute target reference (if necessary), 520

method reference expressions, 531

concepts and notation, 660

conditional expression type (primitive 3rd operand, part i), 574

conditional expression type (primitive 3rd operand, part ii), 575

conditional expression type (reference 3rd operand, part i), 576

conditional expression type (reference 3rd operand, part ii), 577

conditional expression type (reference 3rd operand, part iii), 578

conditional operator ? :, 571, 614, 615

binary numeric promotion, 126

boolean type and boolean values, 51, 51

conditional operator ? :, 614, 615

constant expressions, 605

floating-point operations, 48

forms of expressions, 460, 461

identify potentially applicable methods, 511

integer operations, 43

objects, 55

phase 1: identify matching arity methods applicable by strict invocation, 511

conditional-and operator &&, 570, 613

boolean type and boolean values, 51

conditional-and operator &&, 613

constant expressions, 605

conditional-or operator ||, 570, 614

boolean type and boolean values, 51

conditional-or operator ||, 614

constant expressions, 605

forms of expressions, 460

constant expressions, 605

assignment contexts, 108

boolean constant expressions, 613

class String, 56

creation of new class instances, 366

final fields and static constant variables, 391

final variables, 85

forms of expressions, 461

fp-strict expressions, 462

initialization of fields in interfaces, 285

normal annotations, 310

numeric conditional expressions, 579

objects, 53

String concatenation operator +, 557

String literals, 36

subsequent modification of final fields, 655

unreachable statements, 454, 454, 455

constraint formulas, 661

reduction, 663

constructor body, 259

constructor declarations, 256

definite assignment, constructors, and instance initializers, 629

initial values of variables, 87

kinds of variables, 84

return statement, 436

this, 474

constructor declarations, 256

class body and member declarations, 206

creation of new class instances, 366

declarations, 131, 131

final fields, 219

raw types, 67

return statement, 436

run-time evaluation of class instance creation expressions, 484

simple expression names, 157

syntactic classification of a name according to context, 150

where types are used, 77

constructor modifiers, 258

@Target, 303

constructor overloading, 264

constructor Signature, 258

form of a binary, 380

constructor throws, 259

compile-time checking of Exceptions, 344

declarations, 132

syntactic classification of a name according to context, 150

throw statement, 438

where types are used, 76, 78

context-free grammars, 9

compilation units, 177

continue statement, 434

break, continue, return, and throw statements, 624

labeled statements, 413

names and identifiers, 137

normal and abrupt completion of statements, 406

conversions and contexts, 91

parenthesized expressions, 476

type of an expression, 461

create frame, synchronize, transfer control, 528

run-time evaluation of method references, 540, 540, 541

creation of new class instances, 365

constructor declarations, 256

field initialization, 222

form of a binary, 377

instance initializers, 255

run-time evaluation of class instance creation expressions, 484

static fields, 216

String concatenation operator +, 557

when initialization occurs, 361

D

declarations, 130

functional interfaces, 322

members and constructors of parameterized types, 64

names and identifiers, 137

syntactic classification of a name according to context, 150

where types are used, 77, 78

default constructor, 265

form of a binary, 381

method and constructor declarations, 394

defaults for annotation type elements, 297

marker annotations, 312

single-element annotations, 312

syntactic classification of a name according to context, 152

definite assignment, 607

assignment operators, 582

final variables, 85, 85, 86

initial values of variables, 87

inner classes and enclosing instances, 199

kinds of variables, 84

lambda body, 600

parenthesized expressions, 476

definite assignment and anonymous classes, 627

definite assignment and array initializers, 626

definite assignment and enum constants, 626

definite assignment and expressions, 613

definite assignment and member types, 627

definite assignment and parameters, 626

definite assignment and statements, 617

definite assignment and static initializers, 628

definite assignment and enum constants, 626

final fields, 219

definite assignment, constructors, and instance initializers, 628

final fields, 219

detailed initialization procedure, 363

field initialization, 221, 221

final fields and static constant variables, 393

form of a binary, 377

initialization of fields in interfaces, 285

simple expression names, 157

static initializers, 255

throw statement, 439

when initialization occurs, 361

details on protected access, 166

determining accessibility, 163

determining accessibility, 162

top level type declarations, 185

determining enclosing instances, 480

anonymous constructors, 486

choosing the constructor and its arguments, 482, 482

class instance creation expressions, 478

compile-time declaration of a method reference, 535

default constructor, 265

formal parameters, 257

inner classes and enclosing instances, 198

method reference expressions, 531

run-time evaluation of method references, 541

determining the class being instantiated, 478

abstract classes, 192

class instance creation expressions, 478

enum types, 267

determining the meaning of a name, 148

class members, 207

declarations, 131

interface members, 283

names and identifiers, 137

obscuring, 147

where types are used, 77

division operator /, 552

compound assignment operators, 590

evaluate operands before operation, 468

integer operations, 44

normal and abrupt completion of evaluation, 465

do statement, 424

boolean type and boolean values, 51

do statements, 622

do statements, 622

E

empty statement, 412

empty statements, 617

empty statements, 617

enhanced for statement, 429

@Target, 303

array variables, 331

for statements, 622

scope of a declaration, 141

syntactic classification of a name according to context, 150

where types are used, 76

enum body declarations, 268

constructor declarations, 256

declarations, 130, 130, 131

enum constants, 267

@Target, 303

definite assignment and enum constants, 626

definite assignment and static initializers, 628

enum types, 267

normal annotations, 310

where types are used, 76

enum members, 271

declarations, 130

form of a binary, 381

enum types, 266

@Target, 302

abstract methods, 232

class declarations, 191

declarations, 130

normal annotations, 310

superclasses and subclasses, 200

switch statement, 420

equality operators, 565

constant expressions, 605

erasure, 64

assignment contexts, 109

cast expressions, 549

checked casts and unchecked casts, 122

checked casts at run time, 122

choosing the most specific method, 516

class type parameters, 385

compile-time step 3: is the chosen method appropriate?, 519

constructor Signature, 258

create frame, synchronize, transfer control, 528

declarations, 131

evaluate arguments, 522

field declarations, 390

form of a binary, 378, 379, 380

invocation contexts, 114

method and constructor formal parameters, 396

method and constructor type parameters, 395

method result type, 396

method Signature, 230

raw types, 66

requirements in overriding and hiding, 246

type variables, 58

escape sequences for character and String literals, 37

character literals, 34

String literals, 35

evaluate arguments, 522

formal parameters, 229

variables of reference type, 81

evaluate left-hand operand first, 466

evaluate operands before operation, 468

evaluation order, 466

evaluation order for other expressions, 471

evaluation respects parentheses and precedence, 469

evaluation, denotation, and result, 459

assert statement, 417

evolution of annotation types, 403

evolution of classes, 383

evolution of enums, 400

evolution of interfaces, 400

evolution of packages, 383

example programs, 6

exception analysis of expressions, 346

class instance creation expressions, 477

compile-time checking of Exceptions, 345

method invocation expressions, 499

exception analysis of statements, 346

compile-time checking of Exceptions, 345

explicit constructor invocations, 262

method throws, 238

throw statement, 438

try statement, 443

exception checking, 347

compile-time checking of Exceptions, 344

field initialization, 222

instance initializers, 255

method throws, 239

static initializers, 256

throw statement, 439, 439

try statement, 443

type of a lambda expression, 603

Exceptions, 341

floating-point operations, 49

integer operations, 44

normal and abrupt completion of statements, 406

throw statement, 437

execution, 353

execution of local variable declarations, 410

execution of try-catch, 444

try statement, 443

execution of try-finally and try-catch-finally, 445

try statement, 443

executions, 646

well-formed executions, 647

executions and causality requirements, 647

explicit constructor invocations, 260

anonymous constructors, 486, 486

constructor body, 259

creation of new class instances, 366

definite assignment, constructors, and instance initializers, 629, 629

enum body declarations, 269

exception analysis of statements, 347

form of a binary, 379

inner classes and enclosing instances, 197, 198

instance initializers, 255

invocation contexts, 112

syntactic classification of a name according to context, 151, 151

where types are used, 76, 77

expression compatibility constraints, 663

expression names, 543

declarations, 132

expression statements, 414, 620

evaluation, denotation, and result, 459

expression statements, 620

identify potentially applicable methods, 510

initialization of for statement, 427

expressions, 459

expressions and run-time checks, 462

extended try-with-resources, 451

F

feedback, 7

field (constant) declarations, 283

@Target, 303

array initializers, 335

array variables, 330, 331

declarations, 130

final variables, 85

interface body and member declarations, 282

kinds of variables, 83

obscuring, 147

shadowing, 144

syntactic classification of a name according to context, 150

where types are used, 76

field access expressions, 494

assignment operators, 582

names and identifiers, 138

normal and abrupt completion of evaluation, 465

objects, 54

raw types, 68

simple assignment operator =, 582

static initializers, 256

field access using a primary, 494

field declarations, 211, 388, 402

array initializers, 335

array variables, 330, 331

class body and member declarations, 205

creation of new class instances, 366

declarations, 130

field declarations, 402

obscuring, 147

raw types, 67

reclassification of contextually ambiguous names, 152

shadowing, 144

simple expression names, 157

syntactic classification of a name according to context, 150

where annotations may appear, 314

where types are used, 76

field initialization, 221

definite assignment and static initializers, 628

definite assignment, constructors, and instance initializers, 628

detailed initialization procedure, 364

exception checking, 347, 348

final fields and static constant variables, 393

initialization of fields in interfaces, 285

simple expression names, 157

static initializers, 255

this, 474

field modifiers, 215

@Target, 303

field declarations, 212

final classes, 194, 383

anonymous class declarations, 485

final methods, 234

superclasses and subclasses, 200

verification of the binary representation, 359

final field semantics, 652

memory model, 639

final fields, 219

final fields and static constant variables, 391

field declarations, 402

final variables, 85

verification of the binary representation, 359

final methods, 234, 397

verification of the binary representation, 359

final variables, 85

constant expressions, 606, 606

detailed initialization procedure, 364

enum body declarations, 269

field initialization, 221

final fields, 219

final fields and static constant variables, 391

form of a binary, 377

initialization of fields in interfaces, 285

inner classes and enclosing instances, 197, 199, 199

lambda body, 600

local variable declarators and types, 410

narrowing reference conversion, 99

try statement, 442

try-with-resources, 448

when initialization occurs, 361

finalization of class instances, 369

class Object, 56

enum body declarations, 269

happens-before order, 643

kinds of variables, 83

unloading of classes and interfaces, 373

floating-point literals, 31

constant expressions, 605

lexical literals, 473

floating-point operations, 48

additive operators (+ and -) for numeric types, 561

division operator /, 553

multiplication operator *, 552

narrowing primitive conversion, 96

widening primitive conversion, 95

floating-point types, formats, and values, 45

cast expressions, 550

field declarations, 213

floating-point literals, 33

formal parameters, 229

fp-strict expressions, 462

lambda parameters, 598

lexical literals, 473, 473

local variable declarators and types, 410

narrowing primitive conversion, 97, 97

parenthesized expressions, 476

return statement, 437

unary minus operator -, 548

floating-point value set parameters, 46

floating-point types, formats, and values, 46, 46, 46

for statement, 426

boolean type and boolean values, 51

declarations, 131

initial values of variables, 87

kinds of variables, 84

local variable declaration statements, 409

for statements, 622

forbidden conversions, 106

form of a binary, 376

check accessibility of type and method, 523

compile-time step 3: is the chosen method appropriate?, 519

final variables, 85

loading of classes and interfaces, 356

locate method to invoke, 524

resolution of symbolic references, 359

top level type declarations, 187

when reference types are the same, 56, 57

formal parameters, 226, 257

@Target, 303

array variables, 331

choosing the constructor and its arguments, 482

compile-time declaration of a method reference, 537

compile-time step 3: is the chosen method appropriate?, 519

declarations, 131, 131

default constructor, 265

definite assignment and parameters, 626, 626

evaluate arguments, 522

form of a binary, 381

formal parameters, 257

initial values of variables, 87, 87

invoke test.main, 356

kinds of variables, 83, 84

lambda parameters, 597, 598

method and constructor formal parameters, 395

method declarations, 226

reclassification of contextually ambiguous names, 152, 152

scope of a declaration, 140, 140

shadowing and obscuring, 142

shared variables, 640

syntactic classification of a name according to context, 150, 150, 150

this, 474

variables of reference type, 81

where types are used, 76, 76, 76, 77

forms of expressions, 460

boolean conditional expressions, 579

choosing the most specific method, 515

class instance creation expressions, 478

conditional operator ? :, 572, 572

expression compatibility constraints, 663, 663

identify potentially applicable methods, 511

lambda expressions, 594

method reference expressions, 531

more specific method inference, 687

numeric conditional expressions, 579

parenthesized expressions, 476

forward references during field initialization, 222

when initialization occurs, 361

fp-strict expressions, 462

additive operators (+ and -) for numeric types, 560

cast expressions, 550

constant expressions, 606

division operator /, 553

floating-point types, formats, and values, 45

formal parameters, 229

method declarations, 286

multiplication operator *, 551

return statement, 437

strictfp classes, 194

strictfp interfaces, 279

strictfp methods, 235

value set conversion, 106, 107

widening primitive conversion, 95

fully qualified names and canonical names, 169

compilation units, 177

form of a binary, 377, 380

import declarations, 180, 180

local class declarations, 407

named packages, 178

notation, 6

package members, 174

single-static-import declarations, 184

single-type-import declarations, 181

static-import-on-demand declarations, 184

top level type declarations, 185

type-import-on-demand declarations, 183

function types, 323

checked exception constraints, 672

expression compatibility constraints, 666

type of a lambda expression, 602

type of a method reference, 538

functional interface parameterization inference, 685

expression compatibility constraints, 664

type of a lambda expression, 602

functional interfaces, 319

@FunctionalInterface, 308

checked exception constraints, 671

expression compatibility constraints, 664

functional interface parameterization inference, 685

identify potentially applicable methods, 510

lambda expressions, 595

method reference expressions, 531

type of a lambda expression, 602

type of a method reference, 537

G

generic classes and type parameters, 194

@Target, 303

capture conversion, 103

class instance creation expressions, 477

declarations, 130

form of a binary, 377

generic constructors, 259

generic methods, 237

parameterized types, 59

scope of a declaration, 140

syntactic classification of a name according to context, 150

type variables, 57

types, classes, and interfaces, 89

where types are used, 76

generic constructors, 259

@Target, 303

class instance creation expressions, 477

declarations, 130

form of a binary, 377

scope of a declaration, 140

syntactic classification of a name according to context, 150

type erasure, 64

type variables, 57

where types are used, 76

generic interfaces and type parameters, 279

@Target, 303

capture conversion, 103

declarations, 130

form of a binary, 377

parameterized types, 59

scope of a declaration, 140

subtyping among class and interface types, 72

superinterfaces, 203

syntactic classification of a name according to context, 150

type variables, 57

types, classes, and interfaces, 89

where types are used, 76

generic methods, 237

@Target, 303

compile-time declaration of a method reference, 537

compile-time step 2: determine method Signature, 504

declarations, 130

form of a binary, 377

function types, 323, 323

method declarations, 226, 287

method invocation expressions, 500

method result, 238

method Signature, 230

scope of a declaration, 140

syntactic classification of a name according to context, 150

type erasure, 64

type variables, 57

where types are used, 76

grammar notation, 10

grammars, 9

H

happens-before order, 643

executions, 646

executions and causality requirements, 649

finalization of class instances, 370

hiding (by class methods), 245

obscuring, 147

shadowing, 144

host support for packages, 175

top level type declarations, 187

I

identifiers, 22

declarations, 130

keywords, 24

lexical grammar, 9

identify potentially applicable methods, 509

compile-time declaration of a method reference, 533, 533, 534

compile-time step 1: determine class or interface to search, 500

compile-time step 2: determine method Signature, 503

phase 1: identify matching arity methods applicable by strict invocation, 511

phase 2: identify matching arity methods applicable by loose invocation, 512

phase 3: identify methods applicable by variable arity invocation, 513

identity conversion, 94

assignment contexts, 107

boxing conversion, 101

capture conversion, 104

casting contexts, 115

invocation contexts, 112, 113

numeric contexts, 124

unary numeric promotion, 124

if statement, 415

boolean type and boolean values, 51

if statements, 620

if-then statement, 415

if statements, 620

if-then-else statement, 416

if statements, 620

implementing finalization, 370

import declarations, 180

compilation units, 177

incorporation, 673

incrementation part of for statement, 623

inference variables, 660

inheritance and overriding, 287

compile-time checking of Exceptions, 345

compile-time declaration of a method reference, 535

compile-time step 3: is the chosen method appropriate?, 518

interface members, 283

method declarations, 287

inheritance, overriding, and hiding, 240

class Object, 56

compile-time declaration of a method reference, 535

enum constants, 268

function types, 323

inheriting methods with override-equivalent signatures, 250, 289

variables of reference type, 81

initial values of variables, 87

array initializers, 335

creation of new class instances, 366

field initialization, 221

final fields and static constant variables, 393

initialization of fields in interfaces, 285

kinds of variables, 83, 83, 83

preparation of a class or interface type, 359

run-time evaluation of array creation expressions, 488

run-time evaluation of class instance creation expressions, 484

variables, 80

initialization of classes and interfaces, 360

causes of Exceptions, 343

initialize test: execute initializers, 356

objects, 53

preparation of a class or interface type, 359

run-time handling of an exception, 350

static fields, 216

initialization of fields in interfaces, 285

detailed initialization procedure, 364

field initialization, 221

final fields and static constant variables, 393

initialization of for statement, 427

initialization part of for statement, 623

initialize test: execute initializers, 355

inner classes and enclosing instances, 197

anonymous class declarations, 485

compile-time step 3: is the chosen method appropriate?, 517

determining enclosing instances, 480

explicit constructor invocations, 261

form of a binary, 381

local class declarations, 407

method reference expressions, 531

qualified this, 475

when initialization occurs, 361

input elements and tokens, 19

invocation type inference, 681

lexical grammar, 9, 9

lexical translations, 16

unicode, 16

instance creation, 365, 476

conditional operator ? :, 572, 573

constructor declarations, 256, 256, 256

constructor overloading, 264

creation of new class instances, 365

exception analysis of expressions, 346

field initialization, 222

form of a binary, 377, 379

forms of expressions, 460

functional interfaces, 319

initial values of variables, 87, 87

instance initializers, 255, 255

invocation contexts, 112

invocation type inference, 681

kinds of variables, 84

method reference expressions, 529

names and identifiers, 138

objects, 53, 53

return statement, 436

run-time evaluation of class instance creation expressions, 484

run-time handling of an exception, 350

static fields, 216

String concatenation operator +, 557

String conversion, 106

syntactic classification of a name according to context, 151, 151, 151

types, classes, and interfaces, 88

when initialization occurs, 361

where types are used, 76, 76, 77, 77

instance initializers, 255

class body and member declarations, 206

definite assignment, constructors, and instance initializers, 629

exception checking, 348

return statement, 436

simple expression names, 157

this, 474

throw statement, 439

instanceof operator, 564

expressions and run-time checks, 463

objects, 54

syntactic classification of a name according to context, 151

where types are used, 76, 78

integer bitwise operators &, ^, and |, 568

binary numeric promotion, 126

integer operations, 43

shift operators, 562, 562

integer literals, 25

boxing conversion, 101

constant expressions, 605

lexical literals, 473

integer operations, 43

integral types and values, 43

character literals, 34

integer literals, 25

lexical literals, 473, 473, 473

interaction with the memory model, 372

interactions of waits, notification, and interruption, 635

interface body and member declarations, 282

interface members, 282

member type declarations, 254, 254

scope of a declaration, 140

interface declarations, 278

declarations, 130

reference types and values, 52

types, classes, and interfaces, 88

interface members, 282, 401

check accessibility of type and method, 523

declarations, 130

form of a binary, 378, 380

interface method body, 291

superinterfaces, 204

this, 474

interface method declarations, 402

interface methods, 286

@Target, 303, 303

array variables, 331

declarations, 131, 131, 132

inheritance, overriding, and hiding, 241

interface body and member declarations, 282

raw types, 67

syntactic classification of a name according to context, 150, 150, 150

where types are used, 76, 76, 76, 78

interface modifiers, 278

@Target, 302

static member type declarations, 255

interface type parameters, 401

interfaces, 277

package members, 173

qualified expression names, 158

reclassification of contextually ambiguous names, 153

top level type declarations, 185

interruptions, 635

intersection types, 70

form of a binary, 378, 379

functional interfaces, 323

type variables, 58

where types are used, 77

introduction, 1

invocation applicability inference, 678

invocation type inference, 679, 680, 680, 682

phase 1: identify matching arity methods applicable by strict invocation, 512

phase 2: identify matching arity methods applicable by loose invocation, 512

phase 3: identify methods applicable by variable arity invocation, 513

invocation contexts, 112

class instance creation expressions, 478

constraint formulas, 661, 661

create frame, synchronize, transfer control, 528

expression compatibility constraints, 663

formal parameters, 229

kinds of types and values, 42

lambda expressions, 595

method invocation expressions, 500

method reference expressions, 531

reference conditional expressions, 580

type compatibility constraints, 668

invocation type inference, 679

expression compatibility constraints, 664, 667

invocation type inference, 681

method invocation type, 516

invoke test.main, 356

iteration of for statement, 427

J

Java Virtual Machine startup, 353

K

keywords, 24

identifiers, 23

lexical grammar, 9

primitive types and values, 42

kinds and causes of Exceptions, 342

kinds of conversion, 94

kinds of Exceptions, 342

compile-time checking of Exceptions, 345, 345

generic classes and type parameters, 195

method throws, 238, 239

narrowing primitive conversion, 97

throw statement, 438

widening primitive conversion, 95

kinds of types and values, 41

capture conversion, 103

lexical literals, 473

literals, 24

null literal, 38

throw statement, 438

kinds of variables, 83

formal parameters, 227

L

labeled statements, 413, 619

break statement, 432

continue statement, 434

labeled statements, 619

names and identifiers, 137

lambda body, 599

choosing the most specific method, 515

identify potentially applicable methods, 510, 510

kinds of variables, 84

type of a lambda expression, 603

lambda expressions, 594

exception analysis of expressions, 346

forms of expressions, 460, 461

functional interfaces, 319

identify potentially applicable methods, 510

return statement, 436

scope of a declaration, 140

lambda parameters, 596

array variables, 331

choosing the most specific method, 514, 514

compile-time step 2: determine method Signature, 503

declarations, 131

kinds of variables, 84

phase 1: identify matching arity methods applicable by strict invocation, 511

shadowing and obscuring, 142

syntactic classification of a name according to context, 150

where types are used, 76

least upper bound, 73

intersection types, 70

resolution, 676

lexical grammar, 9

lexical literals, 472

kinds of types and values, 42

lexical structure, 15

lexical grammar, 9

lexical translations, 16

line terminators, 19

character literals, 34

input elements and tokens, 19

lexical translations, 16

white space, 20

link test: verify, prepare, (optionally) resolve, 354

linking of classes and interfaces, 358

causes of Exceptions, 343

check accessibility of type and method, 523

link test: verify, prepare, (optionally) resolve, 354

resolution of symbolic references, 360

literals, 24

lexical grammar, 9

lexical literals, 472

load the class test, 354

loading of classes and interfaces, 356

causes of Exceptions, 343

class literals, 474

load the class test, 354

loading process, 357

superclasses and subclasses, 202

superinterfaces and subinterfaces, 281

local class declaration statements, 619

local class declarations, 407

class instance creation expressions, 477

class modifiers, 191

form of a binary, 377

inner classes and enclosing instances, 197

local class declaration statements, 619

reclassification of contextually ambiguous names, 153

shadowing and obscuring, 142

local variable declaration statements, 408, 619

@Target, 303

array initializers, 335

declarations, 131

initial values of variables, 87

initialization of for statement, 427

initialization part of for statement, 623

kinds of variables, 84

local variable declaration statements, 619

objects, 53

reclassification of contextually ambiguous names, 152

scope of a declaration, 140

shadowing and obscuring, 142

shared variables, 640

syntactic classification of a name according to context, 150

where types are used, 76

local variable declarators and types, 409

array variables, 330, 331

locate method to invoke, 524

run-time evaluation of method references, 540, 540, 541

logical complement operator !, 548, 614

boolean type and boolean values, 51

constant expressions, 605

logical complement operator !, 614

M

marker annotations, 311

annotations, 308

meaning of expression names, 156

expression names, 543

forms of expressions, 460

names and identifiers, 137

meaning of method names, 160

names and identifiers, 137

meaning of package names, 154

names and identifiers, 137

meaning of packageortypenames, 155

type-import-on-demand declarations, 183

meaning of type names, 155

names and identifiers, 137

member type declarations, 254, 291

@Target, 302, 302

class body and member declarations, 205

class instance creation expressions, 477, 477

class modifiers, 191, 191

declarations, 130, 130, 130, 130

definite assignment and member types, 627, 627

form of a binary, 377, 377, 381, 381

inner classes and enclosing instances, 197, 197

interface body and member declarations, 282

interface modifiers, 279

member type declarations, 291

obscuring, 147, 147

qualified type names, 156, 156

reclassification of contextually ambiguous names, 153, 153, 154, 154

reference types and values, 53, 53

shadowing, 144, 144

static-import-on-demand declarations, 185, 185

syntactic classification of a name according to context, 150, 150

type-import-on-demand declarations, 183, 183

where types are used, 76, 76, 76, 76

members and constructors of parameterized types, 63

memory model, 637

interaction with the memory model, 372

volatile fields, 220

method and constructor body, 398

method and constructor declarations, 394

method and constructor formal parameters, 395

method result type, 396

method and constructor formal parameters, 395

interface method declarations, 402

method and constructor overloading, 399

interface method declarations, 402

method and constructor throws, 398

interface method declarations, 402

method and constructor type parameters, 394

class type parameters, 385

method body, 240

abstract methods, 232

constructor body, 260

method declarations, 226

native methods, 235

this, 474

method declarations, 225, 286

@Target, 303, 303

array variables, 331

class body and member declarations, 205

declarations, 130, 131, 131, 132

evaluation, denotation, and result, 459

inheritance, overriding, and hiding, 241

interface body and member declarations, 282

raw types, 67, 67

return statement, 436

simple expression names, 157

syntactic classification of a name according to context, 150, 150, 150, 150

where types are used, 76, 76, 76, 78

method invocation expressions, 499

anonymous constructors, 486, 486

compile-time declaration of a method reference, 532

conditional operator ? :, 572, 573

constructor declarations, 257

declarations, 132

evaluation, denotation, and result, 459

exception analysis of expressions, 346

expressions and run-time checks, 463

field initialization, 221, 222

formal parameters, 229

forms of expressions, 461

happens-before order, 644

hiding (by class methods), 245

initial values of variables, 87

initialization of fields in interfaces, 285

instance initializers, 255

invocation contexts, 112

invocation type inference, 681

kinds of variables, 83, 84

lambda parameters, 598

method declarations, 226

names and identifiers, 138

normal and abrupt completion of evaluation, 465, 465

objects, 54

overloading, 251

overriding (by instance methods), 242

return statement, 436

run-time handling of an exception, 350

simple method names, 160

static initializers, 256

syntactic classification of a name according to context, 150, 151, 152

this, 474

where types are used, 76, 77

method invocation type, 516

choosing the constructor and its arguments, 483, 483

compile-time declaration of a method reference, 537

compile-time step 3: is the chosen method appropriate?, 518

exception analysis of expressions, 346, 346

exception analysis of statements, 347

expression compatibility constraints, 667

invocation type inference, 679

type compatibility constraints, 668

type of a method reference, 538

method modifiers, 231

@Target, 303

method declarations, 226

objects, 55

method overriding, 400

method reference expressions, 529

access to a protected member, 167

declarations, 132

expressions and run-time checks, 463, 464

form of a binary, 379

forms of expressions, 460, 461

functional interfaces, 319

identify potentially applicable methods, 510

names and identifiers, 138

syntactic classification of a name according to context, 150, 151, 152

where types are used, 76, 77, 77

method result, 237

abstract classes, 192

abstract methods, 232

class literals, 473

constructor declarations, 256

function types, 323

functional interfaces, 319

interface method body, 291

method body, 240

method declarations, 226

requirements in overriding and hiding, 246

return statement, 436

type erasure, 64

where types are used, 76

method result type, 396

interface method declarations, 402

method Signature, 230

abstract classes, 192

abstract methods, 232

choosing the most specific method, 516

constructor Signature, 258

form of a binary, 379

functional interfaces, 319

hiding (by class methods), 245

inheritance and overriding, 287

inheritance, overriding, and hiding, 241, 241

inheriting methods with override-equivalent signatures, 250, 289

interface members, 282

method declarations, 226, 287

method result, 238

overloading, 290

overriding (by instance methods), 241, 242, 288

requirements in overriding and hiding, 246

type erasure, 64

method throws, 238

abstract methods, 232

compile-time checking of Exceptions, 344

constructor throws, 259

declarations, 132

method declarations, 226

syntactic classification of a name according to context, 150

throw statement, 438

where types are used, 76, 78

more specific method inference, 686

choosing the most specific method, 514

multiple annotations of the same type, 318

annotation types, 292

annotations, 308

class modifiers, 191

constructor modifiers, 258

enum constants, 268

field (constant) declarations, 283

field modifiers, 215

formal parameters, 228

generic classes and type parameters, 195

generic interfaces and type parameters, 280

interface modifiers, 278

lambda parameters, 598

local variable declaration statements, 409

method declarations, 286

method modifiers, 231

named packages, 178

multiplication operator *, 551

multiplicative operators, 550

binary numeric promotion, 126

constant expressions, 605

floating-point operations, 48

forms of expressions, 460

integer operations, 43

N

name classification, 149

access control, 161

declarations, 132

reference types and values, 53

name reclassification, 152

method invocation expressions, 499

named packages, 178

@Target, 302

names, 129

names and identifiers, 137

compile-time declaration of a method reference, 535

import declarations, 180

local class declarations, 407

named packages, 178

shadowing and obscuring, 142

narrowing primitive conversion, 96

casting contexts, 115

floating-point operations, 49

narrowing primitive conversion, 97

postfix decrement operator --, 544

postfix increment operator ++, 543

prefix decrement operator --, 547

prefix increment operator ++, 546

widening and narrowing primitive conversion, 99

narrowing reference conversion, 99

casting contexts, 115

native methods, 235, 397

method body, 240

new keyword, 476

conditional operator ? :, 572, 573

constructor declarations, 256, 256

constructor overloading, 264

creation of new class instances, 365

exception analysis of expressions, 346

form of a binary, 379

forms of expressions, 460

functional interfaces, 319

initial values of variables, 87, 87

instance initializers, 255

invocation contexts, 112

invocation type inference, 681

kinds of variables, 84

method reference expressions, 529

names and identifiers, 138

objects, 53, 53

return statement, 436

run-time handling of an exception, 350

String conversion, 106

syntactic classification of a name according to context, 151, 151, 151

types, classes, and interfaces, 88

where types are used, 76, 76, 77, 77

non-atomic treatment of double and long, 658

normal and abrupt completion of evaluation, 464

causes of Exceptions, 343

normal and abrupt completion of statements, 406, 406

run-time handling of an exception, 350

normal and abrupt completion of statements, 405

interface method body, 291

method body, 240

normal and abrupt completion of evaluation, 466

run-time handling of an exception, 350

normal annotations, 309

annotations, 308

defaults for annotation type elements, 297

names and identifiers, 138

syntactic classification of a name according to context, 152

notation, 6

notification, 634

null literal, 38

compile-time step 3: is the chosen method appropriate?, 518

identifiers, 23

kinds of types and values, 42

lexical literals, 473

numeric conditional expressions, 579

numeric contexts, 124

floating-point operations, 48

integer operations, 44

numerical comparison operators <, <=, >, and >=, 563

binary numeric promotion, 126

floating-point operations, 48

floating-point types, formats, and values, 47

integer operations, 43

numerical equality operators == and !=, 566

binary numeric promotion, 126

floating-point operations, 48

floating-point types, formats, and values, 47

integer operations, 43

O

object creation, 365

constructor declarations, 256

field initialization, 222

form of a binary, 377

instance initializers, 255

run-time evaluation of class instance creation expressions, 484

static fields, 216

String concatenation operator +, 557

when initialization occurs, 361

objects, 53, 55

checked casts at run time, 122, 123

method invocation type, 517

String literals, 36

obscuring, 147

labeled statements, 413

shadowing, 144

observability of a package, 179

qualified package names, 155

scope of a declaration, 139

observable behavior and nonterminating executions, 650

actions, 640, 641

operators, 38

input elements and tokens, 20

lexical grammar, 9

operators ++ and --, 616

organization of the specification, 2

other expressions, 616

other expressions of type boolean, 615

overload resolution, 502, 509, 511, 512, 513, 514

choosing the constructor and its arguments, 483, 483, 483

choosing the most specific method, 514

compile-time declaration of a method reference, 532, 533, 533, 534, 534, 534, 534, 534, 534, 534, 534, 534, 535, 535, 535, 535

compile-time step 1: determine class or interface to search, 500

compile-time step 2: determine method Signature, 503, 503, 503, 503, 503, 503, 503, 504

conditional operator ? :, 572, 573

enum constants, 268

invocation applicability inference, 678, 678

invocation type inference, 680

method and constructor overloading, 399

more specific method inference, 686, 686, 686, 686, 686

overloading, 251

phase 1: identify matching arity methods applicable by strict invocation, 511, 512, 512

phase 2: identify matching arity methods applicable by loose invocation, 512, 512, 513, 513

phase 3: identify methods applicable by variable arity invocation, 513, 513, 513, 513

what binary compatibility is and is not, 382

overloading, 250, 290

constructor overloading, 264

overriding (by instance methods), 241, 288

final classes, 194

locate method to invoke, 525

superinterfaces, 204

P

package declarations, 178

compilation units, 177

declarations, 130

package members, 173

packages, 173

parameterized types, 59

annotation type elements, 294

capture conversion, 103, 104

checked casts and unchecked casts, 121

class literals, 474

declarations, 131

determining the class being instantiated, 478

field declarations, 390

functional interfaces, 323

generic classes and type parameters, 195

generic interfaces and type parameters, 280

method and constructor formal parameters, 396

method reference expressions, 530

method result type, 396

normal annotations, 310

raw types, 66

reference type casting, 117

reference types and values, 52

superclasses and subclasses, 200

superinterfaces, 202

superinterfaces and subinterfaces, 281

type erasure, 64

types, classes, and interfaces, 89

where types are used, 77

parenthesized expressions, 475

conditional operator ? :, 572, 572

constant expressions, 606

forms of expressions, 460

identify potentially applicable methods, 511

phase 1: identify matching arity methods applicable by strict invocation, 511

phase 1: identify matching arity methods applicable by strict invocation, 511

compile-time declaration of a method reference, 534, 534, 534, 535, 535

compile-time step 2: determine method Signature, 503, 503

invocation applicability inference, 678

more specific method inference, 686

phase 2: identify matching arity methods applicable by loose invocation, 512

phase 3: identify methods applicable by variable arity invocation, 513, 513

phase 2: identify matching arity methods applicable by loose invocation, 512

compile-time declaration of a method reference, 534, 534

compile-time step 2: determine method Signature, 503, 503

more specific method inference, 686

phase 1: identify matching arity methods applicable by strict invocation, 512

phase 3: identify methods applicable by variable arity invocation, 513

choosing the constructor and its arguments, 483

choosing the most specific method, 514

compile-time declaration of a method reference, 534, 534

compile-time step 2: determine method Signature, 503, 503

invocation applicability inference, 678

invocation type inference, 680

more specific method inference, 686

phase 2: identify matching arity methods applicable by loose invocation, 513

poly expressions, 460

boolean conditional expressions, 579

choosing the most specific method, 515

class instance creation expressions, 478

conditional operator ? :, 572, 572

expression compatibility constraints, 663, 663

identify potentially applicable methods, 511

lambda expressions, 594

method reference expressions, 531

more specific method inference, 687

numeric conditional expressions, 579

parenthesized expressions, 476

postfix decrement operator --, 544

floating-point operations, 48, 49

integer operations, 43, 44

normal and abrupt completion of evaluation, 465

operators ++ and --, 616

variables, 80

postfix expressions, 542

final variables, 86

forms of expressions, 460

syntactic classification of a name according to context, 151

postfix increment operator ++, 543

floating-point operations, 48, 49

integer operations, 43, 44

normal and abrupt completion of evaluation, 465

operators ++ and --, 616

variables, 80

potentially applicable methods, 509

compile-time declaration of a method reference, 533, 533, 534

compile-time step 1: determine class or interface to search, 500

compile-time step 2: determine method Signature, 503

phase 1: identify matching arity methods applicable by strict invocation, 511

phase 2: identify matching arity methods applicable by loose invocation, 512

phase 3: identify methods applicable by variable arity invocation, 513

predefined annotation types, 302

prefix decrement operator --, 546

floating-point operations, 48, 49

integer operations, 43, 44

normal and abrupt completion of evaluation, 465

operators ++ and --, 616

variables, 80

prefix increment operator ++, 546

floating-point operations, 48, 49

integer operations, 43, 44

normal and abrupt completion of evaluation, 465

operators ++ and --, 616

variables, 80

preparation of a class or interface type, 359

kinds of variables, 83

link test: verify, prepare, (optionally) resolve, 354

preventing instantiation of a class, 266

constructor declarations, 256

primary expressions, 471

access to a protected member, 167

forms of expressions, 460

postfix expressions, 542

primitive types and values, 42

class literals, 473

conditional operator ? :, 572

evaluation, denotation, and result, 459

kinds of types and values, 41

literals, 24

reifiable types, 65

unboxing conversion, 103

variables, 80

where types are used, 77

program exit, 374

programs and program order, 641

happens-before order, 644

synchronization order, 642

public classes, 384

public interfaces, 400

Q

qualified access to a protected constructor, 167

qualified expression names, 157

access control, 161

constant expressions, 606

field access expressions, 494

field declarations, 213

members and constructors of parameterized types, 64

qualified package names, 155

qualified packageortypenames, 155

qualified this, 475

declarations, 132

syntactic classification of a name according to context, 150

qualified type names, 156

access control, 161

members and constructors of parameterized types, 64

single-static-import declarations, 184

single-type-import declarations, 181

static-import-on-demand declarations, 184

type-import-on-demand declarations, 183

R

raw types, 66

assignment contexts, 108

functional interfaces, 323

invocation contexts, 113

method reference expressions, 531

reifiable types, 65

subtyping among class and interface types, 72

type arguments of parameterized types, 61

unchecked conversion, 103

variables of reference type, 81

where types are used, 77

reading final fields during construction, 654

reclassification of contextually ambiguous names, 152

method invocation expressions, 499

reduction, 663

invocation applicability inference, 678

reference conditional expressions, 580

reference equality operators == and !=, 567

objects, 55

reference type casting, 117

casting contexts, 115

reference types and values, 52

class literals, 473

evaluation, denotation, and result, 459

initial values of variables, 87

kinds of types and values, 41

variables, 80

references, 7

reifiable types, 64

@SafeVarargs, 307

array creation expressions, 487

array initializers, 335

expressions and run-time checks, 463, 464

formal parameters, 228

method reference expressions, 531

type comparison operator instanceof, 564

relational operators, 562

constant expressions, 605

relationship to predefined classes and interfaces, 7

remainder operator %, 554

evaluate operands before operation, 468

floating-point operations, 49

integer operations, 44

normal and abrupt completion of evaluation, 465

repeatable annotation types, 298

@Repeatable, 308

evolution of annotation types, 403

multiple annotations of the same type, 318

requirements in overriding, 289

variables of reference type, 81

requirements in overriding and hiding, 246

compile-time checking of Exceptions, 345

method throws, 239

requirements in overriding, 289, 289, 289

type of a lambda expression, 603

type of a method reference, 538

variables of reference type, 81

resolution, 675

invocation applicability inference, 679

invocation type inference, 681

resolution of symbolic references, 359

link test: verify, prepare, (optionally) resolve, 355

return statement, 436

break, continue, return, and throw statements, 624

constructor body, 260, 260

instance initializers, 255

interface method body, 291

method body, 240

normal and abrupt completion of statements, 406

static initializers, 255

run-time evaluation of array access expressions, 492

array access, 333

evaluation order for other expressions, 471

normal and abrupt completion of evaluation, 465, 465

run-time evaluation of array creation expressions, 488

evaluation order for other expressions, 471

initial values of variables, 87

kinds of variables, 83

normal and abrupt completion of evaluation, 464, 465

run-time evaluation of class instance creation expressions, 484

evaluation order for other expressions, 471

normal and abrupt completion of evaluation, 464

throw statement, 439

run-time evaluation of lambda expressions, 604

creation of new class instances, 366

evaluation order for other expressions, 471

normal and abrupt completion of evaluation, 464

run-time evaluation of method invocation, 520

evaluation order for other expressions, 471

overloading, 251

run-time evaluation of method references, 539

creation of new class instances, 366

evaluation order for other expressions, 471

normal and abrupt completion of evaluation, 464

run-time handling of an exception, 349

expressions and run-time checks, 464

initial values of variables, 87

kinds of variables, 84

throw statement, 437

try statement, 443

S

scope of a declaration, 139

basic for statement, 427

class body and member declarations, 206

class declarations, 191

class literals, 474

compile-time step 1: determine class or interface to search, 500

enhanced for statement, 430, 430

enum constants, 268

field declarations, 213

formal parameters, 228

forward references during field initialization, 222

generic classes and type parameters, 195

generic constructors, 259

generic interfaces and type parameters, 280

generic methods, 237

import declarations, 180

interface body and member declarations, 282

interface declarations, 278

lambda parameters, 598

local class declarations, 407

local variable declarators and types, 410

member type declarations, 254

method declarations, 226

named packages, 178

reclassification of contextually ambiguous names, 152, 153

simple package names, 155

top level type declarations, 185

try statement, 442

try-with-resources, 448

type variables, 57

semantics of final fields, 654

separators, 38

lexical grammar, 9

shadowing, 144

compile-time step 1: determine class or interface to search, 500

obscuring, 147

scope of a declaration, 139

simple expression names, 156

shadowing and obscuring, 142

basic for statement, 427

class body and member declarations, 206

class declarations, 191

enhanced for statement, 430

enum constants, 268

field declarations, 213

formal parameters, 228

generic classes and type parameters, 195

generic constructors, 259

import declarations, 180

interface declarations, 278

lambda parameters, 598

local class declarations, 407

local variable declarators and types, 410

member type declarations, 254

method declarations, 226

named packages, 178

top level type declarations, 185

try statement, 442

try-with-resources, 448

shared variables, 640

happens-before order, 644

shift operators, 561

constant expressions, 605

integer operations, 43

unary numeric promotion, 125

simple assignment operator =, 582

assignment contexts, 109

expressions and run-time checks, 463, 464

normal and abrupt completion of evaluation, 465, 465

simple expression names, 156

constant expressions, 606

field access expressions, 494

simple method names, 160

method declarations, 226

simple package names, 155

simple packageortypenames, 155

simple type names, 156

single-element annotations, 312

annotation type elements, 295

annotations, 308

single-static-import declarations, 184

declarations, 130, 131

identify potentially applicable methods, 509

import declarations, 180

reclassification of contextually ambiguous names, 153, 153

scope of a declaration, 139

simple method names, 160

single-type-import declarations, 181

syntactic classification of a name according to context, 150

single-type-import declarations, 180

declarations, 130, 131

import declarations, 180

reclassification of contextually ambiguous names, 153

scope of a declaration, 139

single-static-import declarations, 184

syntactic classification of a name according to context, 150

sleep and yield, 636

standalone expressions, 460

boolean conditional expressions, 579

choosing the most specific method, 515

class instance creation expressions, 478

conditional operator ? :, 572, 572

expression compatibility constraints, 663, 663

identify potentially applicable methods, 511

lambda expressions, 594

method reference expressions, 531

more specific method inference, 687

numeric conditional expressions, 579

parenthesized expressions, 476

statements, 410

static fields, 216, 393

generic classes and type parameters, 195

kinds of variables, 83, 83

when initialization occurs, 361

static initializers, 255, 400

class body and member declarations, 206

definite assignment and static initializers, 628

exception checking, 347

final fields, 219

generic classes and type parameters, 195

inner classes and enclosing instances, 197

return statement, 436

simple expression names, 157

static initializers, 400

throw statement, 439

static member type declarations, 254

anonymous class declarations, 485

class modifiers, 191

generic classes and type parameters, 195

interface modifiers, 278, 279

static methods, 233, 398

generic classes and type parameters, 195

interface method declarations, 402

simple expression names, 157

static-import-on-demand declarations, 184

declarations, 130, 131

identify potentially applicable methods, 509

import declarations, 180

reclassification of contextually ambiguous names, 153, 153

scope of a declaration, 139

simple method names, 160

syntactic classification of a name according to context, 150

type-import-on-demand declarations, 183

strictfp classes, 194

fp-strict expressions, 462

strictfp interfaces, 279

fp-strict expressions, 462

strictfp methods, 235

fp-strict expressions, 462

String concatenation operator +, 557

boolean type and boolean values, 51

class String, 56

constructor declarations, 256

creation of new class instances, 366

floating-point operations, 48

integer operations, 44

normal and abrupt completion of evaluation, 464

objects, 53, 54

String contexts, 114

types, classes, and interfaces, 88

String contexts, 114

boolean type and boolean values, 51

String conversion, 105

String concatenation operator +, 557

String contexts, 114

String literals, 35

class String, 56

comments, 22

constant expressions, 605

creation of new class instances, 366

escape sequences for character and String literals, 37

lexical literals, 473

reference equality operators == and !=, 567

unicode, 16

strings, 56

lexical literals, 473

literals, 24

objects, 53

String literals, 35, 36

subsequent modification of final fields, 655

subtyping, 71

assignment contexts, 108

checked casts and unchecked casts, 121

choosing the most specific method, 514

constraint formulas, 661

invocation contexts, 113

method throws, 238

narrowing reference conversion, 99

parameterized types, 59

subtyping constraints, 668

type arguments of parameterized types, 61, 61

widening reference conversion, 99

subtyping among array types, 73

array types, 330

subtyping among class and interface types, 71

try statement, 442

subtyping among primitive types, 71

subtyping constraints, 668

superclasses and subclasses, 200

class members, 206

class Object, 55

enum types, 267

final classes, 194

kinds of variables, 83

loading process, 357

subtyping among class and interface types, 72

syntactic classification of a name according to context, 150

where types are used, 76, 77

superclasses and superinterfaces, 384

loading process, 357

superinterfaces, 401

verification of the binary representation, 359

superinterfaces, 202, 401

checked casts at run time, 122

class members, 206

subtyping among class and interface types, 72

superinterfaces and subinterfaces, 281

syntactic classification of a name according to context, 150

types, classes, and interfaces, 88

where types are used, 76, 77

superinterfaces and subinterfaces, 280

interface members, 282

loading process, 357

subtyping among class and interface types, 72

superclasses and subclasses, 202

superinterfaces, 203

syntactic classification of a name according to context, 150

where types are used, 76, 77

switch statement, 419

scope of a declaration, 140, 140

switch statements, 621

switch statements, 621

synchronization, 632

objects, 55

synchronized methods, 235

synchronized statement, 439

volatile fields, 220

synchronization order, 642

actions, 640

interaction with the memory model, 372

synchronized methods, 235, 398

class Object, 56

synchronization, 632

synchronized statement, 440

synchronized statement, 439

create frame, synchronize, transfer control, 528

objects, 55

synchronization, 632

synchronized statements, 624

synchronized statements, 624

syntactic classification of a name according to context, 149

access control, 161

declarations, 132

reference types and values, 53

syntactic grammar, 10

compilation units, 177

input elements and tokens, 20

lexical translations, 16

syntax, 689

T

this, 474

field initialization, 221, 222

initialization of fields in interfaces, 285

instance initializers, 255

static initializers, 256

static methods, 234

threads and locks, 631

objects, 55

throw statement, 437

throw statement, 437

break, continue, return, and throw statements, 624

causes of Exceptions, 343

exception analysis of statements, 346

initial values of variables, 87

kinds of variables, 84

normal and abrupt completion of statements, 406, 406

run-time handling of an exception, 349

top level type declarations, 185

class instance creation expressions, 477

class modifiers, 191

compilation units, 177

determining accessibility, 163

form of a binary, 377

host support for packages, 175

interface modifiers, 279

package members, 173, 174

scope of a declaration, 139, 139, 139

shadowing, 146

single-static-import declarations, 184

single-type-import declarations, 181

when initialization occurs, 361

transient fields, 219, 393

try statement, 440

@Target, 303

compile-time checking of Exceptions, 345

declarations, 131, 132

definite assignment and parameters, 626

exception analysis of statements, 347

expressions and run-time checks, 463, 464

final variables, 85

initial values of variables, 87

kinds of variables, 84

labeled statements, 413

method throws, 239

reclassification of contextually ambiguous names, 152

run-time handling of an exception, 349

scope of a declaration, 141

shadowing and obscuring, 142

shared variables, 640

syntactic classification of a name according to context, 151

throw statement, 437, 438, 438

try statements, 624

where types are used, 76, 78

try statements, 624

try-catch statement, 444

try statement, 443

try-catch-finally statement, 445

try statement, 443

try-finally statement, 445

try statement, 443

try-with-resources, 447

@Target, 303

final variables, 85

local variable declaration statements, 409

scope of a declaration, 141

syntactic classification of a name according to context, 150

try statement, 444

where types are used, 76

try-with-resources (basic), 448

try-with-resources (extended), 451

type arguments of parameterized types, 60

capture conversion, 103

checked casts and unchecked casts, 121

class instance creation expressions, 477, 477

constraint formulas, 661

explicit constructor invocations, 261

method invocation expressions, 500

method reference expressions, 530

reference types and values, 52

reifiable types, 65

subtyping among class and interface types, 72

subtyping constraints, 669

type equality constraints, 670

types, classes, and interfaces, 89

unchecked conversion, 103

where types are used, 77

type comparison operator instanceof, 564

expressions and run-time checks, 463

objects, 54

syntactic classification of a name according to context, 151

where types are used, 76, 78

type compatibility constraints, 667

type equality constraints, 670

type erasure, 64

assignment contexts, 109

cast expressions, 549

checked casts and unchecked casts, 122

checked casts at run time, 122

choosing the most specific method, 516

class type parameters, 385

compile-time step 3: is the chosen method appropriate?, 519

constructor Signature, 258

create frame, synchronize, transfer control, 528

declarations, 131

evaluate arguments, 522

field declarations, 390

form of a binary, 378, 379, 380

invocation contexts, 114

method and constructor formal parameters, 396

method and constructor type parameters, 395

method result type, 396

method Signature, 230

raw types, 66

requirements in overriding and hiding, 246

type variables, 58

type inference, 659

compile-time step 2: determine method Signature, 504

generic constructors, 259

generic methods, 237

type of a constructor, 259

members and constructors of parameterized types, 63

type of a lambda expression, 602

checked exception constraints, 671

expression compatibility constraints, 664

invocation type inference, 682, 683

lambda parameters, 597

type of a method reference, 537

checked exception constraints, 672

type of an expression, 461

type variables, 57

class literals, 474

field declarations, 390

generic classes and type parameters, 194

generic constructors, 259

generic interfaces and type parameters, 279

generic methods, 237

intersection types, 70

method and constructor formal parameters, 396

method result type, 396

reference types and values, 52

type erasure, 64

types, classes, and interfaces, 89

where types are used, 77

type-import-on-demand declarations, 183

declarations, 130

import declarations, 180

reclassification of contextually ambiguous names, 153

scope of a declaration, 139

shadowing, 146

static-import-on-demand declarations, 185

syntactic classification of a name according to context, 152

types, 41

capture conversion, 103

lexical literals, 473

literals, 24

null literal, 38

throw statement, 438

types, classes, and interfaces, 88

types, values, and variables, 41

U

unary minus operator -, 547

constant expressions, 605

floating-point operations, 48

integer literals, 30, 30

integer operations, 43

unary numeric promotion, 125

unary numeric promotion, 124

array access, 333

array access expressions, 491

array creation expressions, 487

bitwise complement operator ~, 548

numeric contexts, 124

shift operators, 561

unary minus operator -, 547

unary plus operator +, 547

unary operators, 544

final variables, 86

unary plus operator +, 547

constant expressions, 605

floating-point operations, 48

integer operations, 43

unary numeric promotion, 125

unboxing conversion, 102

additive operators, 556, 556

array creation expressions, 487

assert statement, 418

assignment contexts, 108

binary numeric promotion, 125

bitwise complement operator ~, 548

boolean equality operators == and !=, 567

boolean logical operators &, ^, and |, 569

casting contexts, 115, 115, 115

conditional operator ? :, 572, 579

conditional-and operator &&, 570, 570

conditional-or operator ||, 571, 571

do statement, 424

equality operators, 565

floating-point operations, 49

if-then statement, 415

if-then-else statement, 416

integer bitwise operators &, ^, and |, 568

integer operations, 44

invocation contexts, 113

iteration of for statement, 427

logical complement operator !, 548

multiplicative operators, 550

numeric contexts, 124

numerical comparison operators <, <=, >, and >=, 563

numerical equality operators == and !=, 566

postfix decrement operator --, 544

postfix increment operator ++, 543

prefix decrement operator --, 546

prefix increment operator ++, 546

switch statement, 421

unary minus operator -, 547

unary numeric promotion, 124, 124

unary plus operator +, 547

while statement, 423

unchecked conversion, 103

@SafeVarargs, 307

assignment contexts, 108

casting contexts, 115, 115

invocation contexts, 113

method result, 238

type compatibility constraints, 668

variables of reference type, 81

unicode, 15

character literals, 34

lexical grammar, 9

primitive types and values, 42

unicode escapes, 17

unicode escapes, 17

escape sequences for character and String literals, 38

input elements and tokens, 19

lexical translations, 16

unicode, 16

unloading of classes and interfaces, 373

kinds of variables, 83

unnamed packages, 179

compilation units, 177

unreachable statements, 452

final fields and static constant variables, 391

instance initializers, 255

lambda body, 599

static initializers, 255

uses of inference, 677

V

value set conversion, 106

assignment contexts, 109

binary numeric promotion, 126

casting contexts, 115

compound assignment operators, 588, 590

create frame, synchronize, transfer control, 528

evaluation, denotation, and result, 459

floating-point types, formats, and values, 45

fp-strict expressions, 462

invocation contexts, 113

simple assignment operator =, 583, 584

unary minus operator -, 547

unary numeric promotion, 124

variables, 80

evaluation, denotation, and result, 459

variables of primitive type, 81

variables of reference type, 81

@SafeVarargs, 307

type of an expression, 461

variables, 80

verification of the binary representation, 358

link test: verify, prepare, (optionally) resolve, 354

volatile fields, 220

happens-before order, 644

synchronization order, 642

W

wait, 633

happens-before order, 643

wait sets and notification, 632

class Object, 56

well-formed executions, 647

executions, 646

what binary compatibility is and is not, 382

when initialization occurs, 361

final variables, 85

initialize test: execute initializers, 355

when reference types are the same, 56

checked casts at run time, 122

constraint formulas, 661

type equality constraints, 670

where annotations may appear, 313

annotation types, 292

annotations, 308

class modifiers, 191

constructor modifiers, 258

enum constants, 268

field (constant) declarations, 283

field modifiers, 215

formal parameters, 228

generic classes and type parameters, 195

generic interfaces and type parameters, 280

interface modifiers, 278

lambda parameters, 598

local variable declaration statements, 409

method declarations, 286

method modifiers, 231

named packages, 178

where types are used, 75

@Target, 303

lexical translations, 17

syntactic classification of a name according to context, 150

where annotations may appear, 313

while statement, 423

boolean type and boolean values, 51

while statements, 621

while statements, 621

white space, 20

input elements and tokens, 20

lexical grammar, 9

lexical translations, 16

widening and narrowing primitive conversion, 99

casting contexts, 115

widening primitive conversion, 94

assignment contexts, 107

binary numeric promotion, 126

casting contexts, 115, 115

invocation contexts, 112, 113

numeric contexts, 124

unary numeric promotion, 124, 124

widening and narrowing primitive conversion, 99

widening reference conversion, 99

assignment contexts, 107

casting contexts, 115, 115

floating-point operations, 48

integer operations, 44

invocation contexts, 113, 113

word tearing, 657

write-protected fields, 656

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset