index []khalid/pgjc3e/pgjc3_index.pdf · index 1017 name 105 nested see nested classes non-static...

27
Index Symbols ! 194 - 180, 556, 597 -- 186 != 191 " 25 # 597 $ 557, 595 % 178, 595 %= 182 & 194 && 196 &= 195 ( 597 () 558 * 108, 121, 174, 178, 558 *= 182 + 180, 185, 558, 597 + concatenation 446 ++ 186 += 182 , 597 . 7, 105, 117, 470, 557, 596 .. 470 ... 90, 95, 269, 270 / 178, 468 /* and */ 26 /** and */ 27 // 26 /= 182 : 119, 468 ; 45, 468 < 190, 595 <= 190 <> 664 -= 182 = 123, 169 == 191 > 190 >= 190 ? 558, 675, 677, 682 ? extends T 675, 682 ? super T 676, 683 ?: 201 @Override 289, 718 @SuppressWarnings("unchecked") 726 [] 70, 72, 555 \ 24, 468, 555, 561 ^ 194, 555, 557 ^= 195 {} 45, 71, 131 | 194, 558 |= 195 || 196 23 Numerics 0 597 2's complement 1010 A absolute pathnames 469, 471 abstract classes 135 interfaces 135 methods 150 abstract data type 662 abstract method declarations in interfaces 310 abstract pathnames 469 PGJC3.book Page 1013 Tuesday, November 25, 2008 9:10 PM

Upload: others

Post on 24-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

Index

Symbols! 194- 180, 556, 597-- 186!= 191" 25# 597$ 557, 595% 178, 595%= 182& 194&& 196&= 195( 597() 558* 108, 121, 174, 178, 558*= 182+ 180, 185, 558, 597+ concatenation 446++ 186+= 182, 597. 7, 105, 117, 470, 557, 596.. 470... 90, 95, 269, 270/ 178, 468/* and */ 26/** and */ 27// 26/= 182: 119, 468; 45, 468< 190, 595<= 190<> 664-= 182

= 123, 169== 191> 190>= 190? 558, 675, 677, 682? extends T 675, 682? super T 676, 683?: 201@Override 289, 718@SuppressWarnings("unchecked") 726[] 70, 72, 555\ 24, 468, 555, 561^ 194, 555, 557^= 195{} 45, 71, 131| 194, 558|= 195|| 196’ 23

Numerics0 5972's complement 1010

Aabsolute pathnames 469, 471abstract

classes 135interfaces 135methods 150

abstract data type 662abstract method declarations

in interfaces 310abstract pathnames 469

PGJC3.book Page 1013 Tuesday, November 25, 2008 9:10 PM

Page 2: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1014 INDEX

abstraction 2, 10access order 823, 824accessibility 7, 16, 129

anonymous classes 380default 132, 142local classes 372members 129, 135, 138modifiers 132non-static member classes 362package 132private 143protected 141public 139static member classes 357UML 139

accessibility modifiers 40, 48activation record

see method execution 235actual parameter 81actual parameter list 81, 323actual type parameters 665adding to class 284additive operators 180aggregation 10, 12, 287

hierarchy 287aliases 6, 192, 193

see also referencesambiguous call 324analyzing program code 854anchoring 557anchors 557annotations

@Override 289, 718@SuppressWarnings("unchecked") 726

anonymous arrays 74[] 74

anonymous classes 377, 773event listeners 377

anti-symmetric 766Apostrophe 24appending elements 805application 15, 563argument

see actual parameterargument index 595arguments to main method 95ArithmeticException 241array creation expression 70, 74array initializer block 74array list 806array operations 790array store check 319, 726

ArrayIndexOutOfBoundsException 73, 241arrays 69, 424

[] 70, 72{} 71anonymous 74array creation expression 70array initialize list 71, 74array name 70array size 71array store check 319, 726collection operations 790declarations 70default initialization 70, 71dynamic 806element default value 318element type 70elements 69, 72index expression 72initialization 71, 76iterating over 220length 69multidimensional 76objects 424ragged 76reference 70, 73, 319searching 843sorting 842subtype covariance 317

arrays of arrays 69, 76multidimensional 76

ArrayStoreException 319, 790ASCII 23, 29assert statement 265

see assertions 265AssertionError 243, 265, 266

see also assertions 265assertions 265, 376

assert statement 265compiling 267conditional compilation 275control flow invariants 274enabling and disabling 269internal invariants 273postconditions 275preconditions 275using 272

assignable 164, 322assignment

widening reference 679widening reference conversions 287

assignment compatible 164, 322assignment conversions 164

PGJC3.book Page 1014 Tuesday, November 25, 2008 9:10 PM

Page 3: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1015

assignmentscascading 170compound operators 182, 195expression statement 170implicit narrowing 171multiple 170numeric conversions 171operator 167, 169primitive values 169references 169

associativity 167, 168asynchronous 615attributes see propertiesautoboxing 430automatic garbage collection 6, 390automatic variables see local variablesautomaton 554

BBackslash 24Backspace 24backtracking 559bags 796balanced tree 782, 783base 22, 431, 434base class 284basic collection operations 784basic map operations 821binary

numbers 1005numeric promotion 166operators 167

binary files 480, 481binary numbers 1005binary representation

see binary valuesbinary search

arrays 843lists 840

binary values 480, 481bit patterns 1010blank final variable 89, 149blocked for I/O state 635blocked for join completion state 635blocked for lock acquisition state 635blocking operations 476blocks 44, 45, 131

catch 246finally 246, 251scope 131try 245

Booleanconditional expression 204

boolean conversion 598Boolean wrapper class 437booleans 28, 30

casting 165expressions 190literals 23

boundary matchers 557bounded type parameters

constraint 684bounded wildcard 675bounds

constraint 684boxing

for(:) statement 221boxing conversions 162break statement 209, 224bridge method 716, 768BS see Backspacebuckets 760buffering streams 479builder tools 41building abstractions 10bulk map operations 822bulk operations on collections 785byte 22, 28byte code 15byte streams 468

CC 151C++ 151cache 153Calendar 536calendar 539

constants 538factory methods 537field numbers 537field values 538

call chaining 81call stack

see runtime stack 235call-by-reference 86call-by-value 86callee 81caller 81canonical path 471capture conversion 163, 705capture of 703carriage return 24, 25

PGJC3.book Page 1015 Tuesday, November 25, 2008 9:10 PM

Page 4: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1016 INDEX

cascading assignments 170cascading if-else statements 207case labels 207, 208case-sensitivity 20cast 730cast operator 161, 164, 166, 328casting 164

see also conversionscatch block 246catch-and-throw paradigm 235catching exceptions 235ceiling entry 828ceiling key 828certification 851, 959chained streams 468chaining 416

constructors 306, 416finalizers 397new operator 365

changing list contents 841char 29character

non-delimiter 575regular expression 554

character class 555predefined 557

character conversion 598character encoding 488

see also character setscharacter sequences

see strings and string builderscharacter set

ASCII 23, 29, 488ISO Latin-1 23, 29Unicode 23, 29, 488

character streams 468, 488Character wrapper class 436character-based device

console 500characters 29

literals 23searching for 448

checked exceptions 243child class 284child threads 615, 619choosing between String and StringBuilder

class 456Class class 425class file 15class literals 733class lock 626, 631class method 10

class modifiers 40class path

absolute pathnames 119entries order 119entry-separator character 119fully qualified package name 119path-separator character 119relative pathnames 119search in a named package 118searching for classes 117searching in JAR files 121white space 120wild card * 121

class path wildcard 121class search path

see class pathclass variable 10ClassCastException 242, 329classes

abstract 135accessibility 132, 353adding to 284anonymous 377base 284body 40child 284cohesion 346constructors 48, 302coupling 346declaration context 353declarations 40, 104definitions 2, 5derived 284diagram 8, 9encapsulation 345extending 136, 284file name 356final 136final vs. abstract 137fully qualified name 117fully qualified package name 106generalized 286grouping 105header 40initialization 412, 419inner 352instance members 40instances 4local 371members 7methods 147modifiers 135

PGJC3.book Page 1016 Tuesday, November 25, 2008 9:10 PM

Page 5: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1017

name 105nested see nested classesnon-static member 352, 359normal 135Object 424on-the-fly 352parent 284runtime 425scope 129searching for 117specialized 286static members 40, 355subclass 10, 284superclass 10, 284top-level 352variables 147wrappers 424, 428

ClassLoader class 424ClassNotFoundException 241CLASSPATH environment variable

see class path-classpath option

see class pathcleaning up 392clean-up code 252client 15Cloneable interface 425cloning objects 425code optimizations 149code reuse 284, 344cohesion 346

coincidental 346functional 346high 346

coincidental cohesion 346Collection interface 779collections 680, 777, 779

array operations 790ArrayList 806basic operations 784, 821bulk operations 785, 822Cloneable 780customizing 838data structures 782duplicate elements 796, 804elements 777first element 800, 801HashSet 796implementations 778, 780, 782interfaces 777, 778iterators 785last element 800, 801

LinkedList 806List 806lists 804Map 821, 823map views 822maximum 841minimum 841NavigableSet 800optional operations 784ordered 780, 804range-views 800, 801, 805retaining elements 785Serializable 780shuffle elements 839sorted 780SortedSet 800, 801subset 800, 801textual representation 788thread-safety 806, 823TreeMap 828TreeSet 802, 828unordered 780unsupported operations 821utility methods 778Vector 806views 800, 801, 805, 822

collections framework 777Collections utility class 838, 840command

java 17javac 16

Comma-Separated-Value 611comments 26common memory space 614communication 7, 81Comparable interface 765

compareTo 765comparable objects 765, 766comparator 765Comparator interface

compare 771comparing objects 425, 771

see also equalitycomparison 190compilation unit 106compile pattern 554complete methods 149completes abruptly

see exception propagation 238composite object 10compound assignment operators 182compound statement 45

PGJC3.book Page 1017 Tuesday, November 25, 2008 9:10 PM

Page 6: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1018 INDEX

computerized scientific notation 599concatenation 558concatenation of strings 446concatenation operator 185concrete parameterized types 674concrete types 674concurrent activities 614ConcurrentModificationException 787, 788conditional 190

and 196expressions 201, 204operators 196, 201or 196statements 204

conditional expressionBoolean 204

conditions 190congruent 766connecting punctuation 20Console 594console 500

formatted prompting 502formatted values 492reading password 501

const 21constant declarations 310constant values 21, 148constants 314constituent objects 10constituents 12constraints

forward reference 702constructor chaining 303, 306, 416constructors 3, 48, 302

accessibility 139accessibility modifier 48body 48chaining 303, 306class name 48declaration 40default 49header 48implicit default 49local declarations 48overloading 51

constructs 20high-level 20loops see iteration statementssynchronized blocks 629, 630, 631

containers 680context switching 614

continue statement 226contract 2, 310, 312, 345contracting lists 805control flow

assert 265break 209, 224continue 226do-while 217for(:) 220for(;;) 218if 204if-else 205iteration see iteration statementsloops see iteration statementsreturn 228statements 45, 204switch 207throw 255transfer statements 223while 217

control flow invariants 274control transfer 223conversion categories 163

see formatting conversionsconversion contexts 163conversions 160, 319

assignment 164contexts 163identity 183implicit narrowing 183method invocation 164narrowing reference 328, 679, 703number systems 1006, 1008numeric promotions 165parameters 82reference casting 327string concatenation 185to strings 450truncation 172type safe 323unsafe casts 329widening reference 287, 328, 679

converting number systems 1006, 1008core interfaces 778Core Map Interfaces 782counter-controlled loops 218country codes 532coupling 346

loose 346covariant return 290-cp option

PGJC3.book Page 1018 Tuesday, November 25, 2008 9:10 PM

Page 7: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1019

see class pathCR see Carriage returncrab 220creating

files and directories 473objects 201threads 615

CSV 611currency 532, 546

formatting 546currency formatter 546, 547currency symbol 20current directory 469

. 117empty string 469

current object 45cursor 806

D-D option

see properties-d option 115daemon 615, 647dangling references 390data streams 477, 479, 480data structures 782data types see typesDate 535date 532, 766

epoch 535formatting 542lenient 544

date formattingstatic factory methods 541styles 542

date/time composition conversions 600date/time conversions 600DateFormat 541dates 532dead state 635deadlocks 651decimal format 598, 599decimal places 599declaration statements 219declarations

arrays 70, 201classes 40, 104enums 104interfaces 104local 45main method 95

methods 44packages 104, 106statements 45variables see variable declarations

declared type 288, 323declaring see declarationsdecoupling 341decrement operator 186deep copying 425default

accessibility 132, 139, 142constructor 49exception handler 239values 33, 406, 416

defaultlabel 208

default locale 533, 547default package 106definitions

inheritance 313interfaces 310

delegating requests 345deleting files or directories 474delimiter pattern 574delimiters 547, 563, 571, 576deque 779, 783derived class 284deserialization of objects 510destination directory 115destination object 593destination of data 468destroying objects 396destructive collection operations 785developer exam 856diagrams

class 3object 5see also UML

dictionary 780dictionary order 445difference 796directories 470, 472

entries 470, 473see also files 474

directory permissions 472disjunct collections 798disposal of resources 393dividend 178division

floating-point 178integer 178

division operator

PGJC3.book Page 1019 Tuesday, November 25, 2008 9:10 PM

Page 8: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1020 INDEX

/ 178divisor 178documentation 26documentation comment 26

tags 27documenting see documentationdot 105double 22, 29double quote 24do-while statement 217downcasting 161duplicate elements 796, 804duplicating objects 425dynamic method lookup 295, 340, 341dynamic type 288dynamically resizable arrays 806

Eelement type 70elements 69, 777elements of collections 777eligible for garbage collection 391else clause matching 207empty set 796empty statement 45empty string 469, 558encapsulation 105, 345, 353encapsulation of implementation 345enclosing class 352, 360enclosing context 359, 363encoding of characters 488end of file 475, 478

see also end of streamend of stream 482, 489, 496, 497, 510engine 554enhanced for loop 216entering shared resource 626entries 780, 821entries in directory 470, 473entry set 821enum type

finalization 397static member type 355

enum typesnested 355

enumerated typeswitch expression 207

enumerated types 211EOFException 241epoch 535equality 191, 425

equals method 193, 425object value 193objects 193primitive values 191reference values 192

equals method 193, 425equivalence relation 754equivalent collections 798erasure 714, 717, 719

of the supertype method 721same 721

Error 242, 266escape sequences 24evaluation order 168, 197

arithmetic expressions 174evaluation short-circuits 197event 42event listeners

anonymous classes 377event model 42exam 851exam voucher 852Exception class 241exception handler 235

see also exceptionsExceptionInInitializerError 243exceptions 235, 245

ArrayIndexOutOfBoundsException 73ArrayStoreException 319, 790ClassCastException 329ClassNotFoundException 512ConcurrentModificationException 787default handler 239EOFException 480FileNotFoundException 478handler 235ignored 396IllegalThreadStateException 615IndexOutOfBoundsException 443, 805IOException 475NumberFormatException 430situations 240StringIndexOutOfBoundsException 449, 457,

458throw 255throwing see throwing exceptionsthrown by JVM 241thrown by method 44thrown programmatically 241types 239uncaught 239unchecked 244

PGJC3.book Page 1020 Tuesday, November 25, 2008 9:10 PM

Page 9: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1021

UnsupportedOperationException 784exchanging information 81execution paths 614existence of files 470, 472exiting a shared resource 626explicit

garbage collection 398referencing 373

exponent 22expression statements 45, 170, 219, 220expressions 208

actual parameters 81assert 265boolean 190case labels 208conditional 201deterministic evaluation 166label 208return 228statements 45

extendingclasses 284interfaces 313Thread 619

extends 675, 682, 685bounded type parameters 684constraint 684

extends clause 284interfaces 310

extensions.class 15.java 15

external encoding 488external libraries 410extracting substrings 449

Ffall through 208false literal 23FF see Form feedfield declarations 40field initialization 416field numbers 537field values 538fields 2, 611file 766File class 468file name 104, 356, 468, 470file permissions 472file streams 477

file system 468files 468, 470, 472

access 472aliases 475binary 480creating 473deleting 474entries 473existence 472modification time 471name 470name filter 473not found 478path 470renaming 474size 471streams 477text 494

filter streams 479filtering file names 473filters 468final

classes 136members 148parameters 89

finalization mechanism 391finalize method 396finalize method 425finalizer 396finalizer chaining 397finally block 246, 251first element 800, 801first map entry 827fixed arity method 90fixed text 594flags 595, 597float 22, 29floating-point 28

double 29float 29literals 22

floating-point arithmetic 176strictfp 177

floating-point conversions 599computerized scientific notation 599decimal format 599decimal places 599general scientific notation 599hexadecimal exponential format 599significant digits 599

floating-point data types 22floating-point division 178

PGJC3.book Page 1021 Tuesday, November 25, 2008 9:10 PM

Page 10: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1022 INDEX

floating-point remainder 179floor entry 828floor key 828flow control see control flowflushing streams 476, 491for(:) statement 220for(;;) statement 218

collections 787iterator 787traverse collections 788

for-each loop 216form feed 24, 25formal parameter

modifier 44name 44type 44

formal parameters 44, 48, 81, 131, 323formal type parameter 663formal type parameter list 40, 44format exceptions 601format specifier 594, 595

argument index 595flags 595, 597formatting conversions 595precision 596width 596

format string 594fixed text 594format specifier 594

formatted prompting 502formatted values 492

Console 501Formatter 593formatter 602

destination object 593fixed text 594format specifier 594format string 594

formatting 26formatting conversions 595, 596

boolean conversion 598character conversion 598date/time composition conversions 600floating-point conversions 599general conversions 597hash code conversion 598integral conversions 598string conversion 598

forward reference 702fractional signed numbers 28framework for collections 777fully qualified class name 117

fully qualified names 315fully qualified package name 106fully qualified type name 105, 109functional cohesion 346

Ggain lock ownership 627general abstractions 286general contract

compareTo() 766equals() 754hashCode() 761

general conversions 597boolean conversions 598hash code conversions 598string conversions 598

general loops 218general scientific notation 599generalization 10generalized classes 286generic class 663, 664generic instance method 700generic interface 666generic method 699

calling 700generic method call

inference 700generic static method 700generic subtype method 721generic type 663

extending 668implementing 695

genericsarrays 726casting 724class literals 733collections 672constructors 697enums 733erasure 714, 721exception handling 730inherited methods 721instanceof 723JVM 662method signature 716methods 697, 699nested classes 731non-reifiable types 723overloading 716, 717overriding 716, 718reifiable types 722, 723

PGJC3.book Page 1022 Tuesday, November 25, 2008 9:10 PM

Page 11: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1023

subsignature 716type erasure 670, 714var-args 729wildcards 673

get operation 680getter method 41goto 21, 223grammar rules 20greedy quantifiers 559grep 610group 554, 563group logical operator 558grouping 105groups of objects 777GUI applications 615

Hhalf-open interval 842, 844handles see referenceshas-a relationship 287hash code conversions 598hash codes 424hash function 760hash table 782, 783hash value 760Hashing 760HashSet 796head map view 827head set view 800, 801heap 390hexadecimal exponential format 599hexadecimal format 598hexadecimal numbers 1005hiding internals 345high cohesion 346higher entry 828higher key 828Horizontal tab 24HT see Horizontal tab

II/O buffering 479I/O package 468identifiers 20

predefined 20reserved 20variable 31

identity conversion 162, 183identity of object 5IEEE 754-1985 29

if-else statement 205ignored exceptions 396illegal thread state 615IllegalArgumentException 242immediate superclass 305immediately enclosing instance 352implementation 2implementation inheritance 284implementations 286, 345

collections 778inheritance hierarchy 137

implementations of collections 780implementing

Comparable 765Comparator 771interfaces 312

implements clause 312implicit

inheritance 284narrowing conversions 183

implicit default constructor 49import

declaration 108single-type-import declaration 108statement 104type-import-on -demand declaration 108see also static import

importingenum constants 111nested static types 113nested types 357reference types 107static members 109

increment expression 218increment operator 186independent lifetimes 287index 69index bounds 805index expression 72IndexOutOfBoundsException 443, 805individual array elements 72inequality 191

see also equalityinfinite loop 220infinity 176

negative 176positive 176

information hiding 345inheritance 10, 287

hierarchy 286, 365serialization 519supertype–subtype relationship 287

PGJC3.book Page 1023 Tuesday, November 25, 2008 9:10 PM

Page 12: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1024 INDEX

initial state of object 416initialization

arrays 71, 76code 72default values 33for statement 218objects 5references 32variables 31

initializer expressions 406initializers 406

declaration-before-reading rule 407initializing see initializationinner classes 352

synchronization 630input 468input stream 468InputStream class 475insertion order 797, 824insertion point 840, 844instance

members 10, 40methods 10, 44, 45variable initialization 33variables 10, 35see also object

instance initializer block 40, 413instance methods 6instance variables 6, 416instanceof operator 201, 327, 328instantiation 4, 135

anonymous classes 380local classes 374non-static member classes 360parameterized type 665static member classes 355

int 22, 28integer arithmetic 175Integer data types 22integer division 178integer remainder operation 179integers 28

byte 28data types 29int 28literals 22long 28representation 1010short 28types 29

integral conversions 598decimal format 598

hexadecimal format 598octal conversions 598

integral types 28, 29integrity (maintaining) 627interface constant antipattern 110interface-based 780interfaces 309

abstract 135accessibility 132body 310collection core 777declarations 104extending 313header 310implementing 379initialization 419references 314top-level 352variables 314

internal invariants 273internationalization 532interned 432inter-package accessibility 346interpreter 16intersection 556, 796intervals 556intra-class dependencies 346invocation

parameterized type 665invocation stack

see runtime stack 235invoking garbage collection 398IOError 243IOException 241is-a relationship 286, 287, 344ISO Latin-1 23, 29Iterable 788iteration statements 216

next iteration 226termination 216, 225

iterators 785fail-fast 787ordered collection 789sorted collection 789unordered collection 789

JJAR file 120

libraries 121Java

Native Interface see JNI

PGJC3.book Page 1024 Tuesday, November 25, 2008 9:10 PM

Page 13: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1025

java 17-disableassertions or -da 269-disablesystemassertions or -dsa 272-enableassertions or -ea 269-enablesystemassertions or -esa 272

Java byte code 15Java compiler 16Java Native Interface see JNIJava Virtual Machine see JVMJavaBeans 41

event model 42events 42getter methods 41listener 42naming patterns 41properties 41setter methods 41source 42

JavaBeans Standard 41javac 16javadoc comment 26javadoc utility 27JDK 16JNI 152joining threads 637JVM 16

Kkey insertion order 823key objects 780key sets 821, 828key sorting 826keys 821keywords 20

abstract 135, 150assert 265boolean 30byte 28case 207catch 246char 29class 40, 310const 21continue 226default 208do 217double 29else 205extends 284, 675, 682, 684, 685final 89, 136, 148finally 251

float 29for 218, 220if 204implements 312import 108instanceof 201, 327, 328, 723int 28interface 310long 28native 151new see new operatornull 328package 106private 143protected 141public 139reserved words 21return 228short 28static 16, 109, 355, 410strictfp 177super 292, 295, 305, 366, 676switch 207synchronized 150, 627this 45, 363throw 255throws 257transient 152try 245unused words 21void 16, 429volatile 153while 217

Llabeled break statement 225labels 223, 225

break 225case 207default 208expressions 208labeled statement 223switch statement 207

language codes 532last element 800, 801last map entry 827lazy quantifier 560least significant bit 1010left

associativity 167left-most bit 1010

PGJC3.book Page 1025 Tuesday, November 25, 2008 9:10 PM

Page 14: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1026 INDEX

legacy class 662legacy supertypes 719legal assignments 322length method 443length of file 471lenient 544lexical analyzer 571lexical tokens 20LF see Linefeedlibraries 410lifetime 391

see scope 35limit 564, 566line terminator 25linear implementation inheritance 286Linefeed 24line-oriented 581lines of text 494line-separator 491LinkageError 242linked data structures 662linked list 806listener 42listing directory entries 473lists 779, 804, 806

binary search 840changing contents 841iterators 806positional 780sublist 805

literals 21boolean 23character 23default type 22double 22escape sequences 24false 23float 22floating-point 22integer 22null 21predefined 21prefix 22, 1006quoting 23scientific notation 22string 25suffix 22true 23

litmus testdesign by inheritance 286

live threads 636

local 34chaining of constructors 303, 416classes 371variables 36, 131

local declarations 44, 45local variable declarations 48locale 446, 532, 576

country codes 532country name 533language codes 532language name 533predefined 533

locale-sensitive 532localization 532locations

see class pathlocks

class 626object 626

lockstep 567, 570, 572logical AND 558

& 194logical complement

! 194logical exclusive OR

^ 194logical inclusive OR

| 194logical operator 558

empty string 558quantifiers 558repetition operators 558

logical OR 558logical XOR

^ 194long 22, 28

suffix 22longest possible match 559lookahead 572lookahead methods 573lookahead-and-parse loop 572loop condition 216loops see iteration statementsloose coupling 346loss of precision 160lower bound 675lower bounded wildcard

? super T 676lower bounded wildcard references 683lower entry 828lower key 828

PGJC3.book Page 1026 Tuesday, November 25, 2008 9:10 PM

Page 15: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1027

Mmagnitude 160main method 16, 17, 94

modifiers 95main thread 615maintaining integrity 627manifest constant 148manifest file

See JAR utility 120manipulating 539many-to-one relation 821map views 822mappings 780

See entries 780maps 779, 780, 821, 823

access order 823entries 780key insertion order 823mappings 780multimap 702ordering mode 823submap view 827

marker interfaces 310, 511match-and-replace loop 570match-and-replace mode 567

lockstep 570non-terminal append-and-replace step

570terminal append-and-replace step 570

Matcher 566matcher

lockstep 567match-and-replace loop 570match-and-replace mode 567one-shot matching 566reset 567substrings 568successive matching 567

Math class 47mathematical set 796MAX_VALUE constant 433member declarations 40, 310members 3, 129

access 45accessibility 135, 138default values 33final 148inheritance 284instance 40modified 284modifiers 146of objects 7

scope 129short-hand 46static 7, 40, 147terminology 10variables see fields

memory management 390message

receiver 7metacharacters 555

escaping 561method

native 258method call 7, 44, 81

chaining 458, 459non-varargs 93varargs 93

method declarations 40method header 150, 151method invocation conversions 164, 323method modifiers 44method overloading 47, 292method overriding 288, 292, 418method signature 44, 289methods 3

@Override 289abstract 150abstract method declarations 310accessibility 44advisory 638, 639ambiguous call 324automatic variables see local variablesblocks 44body 44, 131bridge 716call chaining 81call see method callcalling varargs method 91chained 447clone 425declaration 44, 81dynamic lookup 341equals 193, 425exceptions 44finalize 396, 425fixed arity 90formal type parameter list 44generic 699getClass 425header 44implementation 150invocation see method calllocal declarations 44

PGJC3.book Page 1027 Tuesday, November 25, 2008 9:10 PM

Page 16: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1028 INDEX

local variablesmain see main methodmethod invocation conversions 323modifiers 44most specific 324mutually exclusive 629name 81native 151objects 45overloaded resolution 324overloading see method overloadingoverriding see method overridingoverriding vs. overloading 292parameters 44recursive 243return 228return value 44signature 44, 47, 292, 716subsignature 718synchronized 150, 627termination 228throws clause 257toString 425valueOf 450variable arity 90

MIN_VALUE constant 433minimizing overhead 392modification time 471modifiers

abstract 135, 150accessibility 132, 138classes 135final 148members 146native 151static 147strictfp 177synchronized 150transient 152volatile 153

monitor 626see locks

most significant bit 1010most specific method 324multidimensional arrays 76multi-line mode 572multimap 702multiple assignments 170multiple bounds 686multiple implementation inheritance 309multiple interface inheritance 309multiple-line comment 26

multiplication operator* 178

multiplicative operators 178multisets 796multitasking 614multithreaded programming 614mutable character sequences 456mutex

see locks 626mutually comparable 838, 840, 844mutually exclusive

actions 206locks 626operations 627

MVC 346

Nname 20, 122name clash 721named constants 148names of files 470namespaces 48naming conventions of files 468naming patterns 41NaN 177narrower range 160narrowing conversions

primitive 160reference 161

narrowing reference conversions 328, 679, 703

native libraries 410native methods 151, 258

header 151natural order 765, 838, 842navigable map 779

first entry 827last entry 827range-views 827views 827

navigable set 779, 800ceiling 802floor 802higher 802iterator 802lower 802

NavigableMap 827NavigableSet 800negation 556negative zero 177nested classes 352

PGJC3.book Page 1028 Tuesday, November 25, 2008 9:10 PM

Page 17: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1029

anonymous 377full name 356generic 731local 371non-static member 359static members 355synchronization 630

nested parameterization 670nested parameterized types 706nested types 40, 352nested wildcards 678new operator 4, 48, 70, 365, 377, 416

special form 361Newline see LinefeedNL see NewlineNoClassDefFoundError 243node 662non-associativity 167non-metacharacters 555non-reifiable types 722, 729non-runnable states 635nonstatic code

See nonstatic context 40nonstatic context 40non-static field 10non-static member classes

full name 356non-static type 665non-terminal append-and-replace step 570non-varargs method call 93normal class 135normal execution 237notifying threads 426, 640null reference 21

casting 165, 328nulling references 393NullPointerException 242Number class 433number formatter 546, 547

currency 546numbers 546

number formattingfactory methods 546

number systemsbase 22binary 1006converting 1006, 1008decimal 22, 1006hexadecimal 22, 1006octal 22, 1006

NumberFormat 546NumberFormatException 242, 430

numbers 532, 546formatting 546

numeric promotions 165assignment 171binary 166unary 165

numeric wrapper classes 433

Oobject 4Object class 286, 424object creation 519object creation expression 185object hierarchy 287object lock

see locks 626object references 4, 31object state 6, 48, 86, 416object-oriented design 345

cohesion 346object-oriented programming 2objects 13

alive 391arrays 69callee 81caller 81Class class 425cleaning up 392cloning 425communication 81comparing 425, 771composite 391constituent 12, 391constructing 416contract 345creation 519decoupling 341deserialization 510destroying 396equality 193, 425exchanging information 81identity 5immutable 428implementation 345initial state 416initialization 5, 48initializer block 413internals 345lifetime 391members 7

PGJC3.book Page 1029 Tuesday, November 25, 2008 9:10 PM

Page 18: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1030 INDEX

methods 45Object class 424outer 362persistence 510persistent 152reachable 391reading 510resurrection 391serialization 510services 345state see object statestreams 477value equality 193writing 510

octal conversionsoctal format 598

octal numbers 1005one-dimensional arrays 69one-shot matching 566on-the-fly classes 352OOP 2open range-view operations 805operands 164

evaluation order 168operations 2operators 166

- 180-- 186! 194!= 191, 192% 178%= 182& 194&& 196&= 195* 174, 178*= 182+ 180, 185++ 186+= 182. 7, 105/ 178/= 182< 190<= 190-= 182= 169== 191, 192> 190>= 190? : 201^ 194

^= 195| 194|= 195|| 196assignment 167, 169associativity 166binary 167boolean 190, 191, 194cast 166comparisons 190compound assignment 182, 195conditional 196, 201decrement 186dot 7equality 191execution order 168floating-point 176floating-point division 178floating-point remainder 179increment 186instanceof 201, 327, 328integer arithmetic 175integer division 178integer remainder 179logical 194multiplicative 178new see new operatoroverflow 176overloaded 175, 178postfix 167precedence 166relational 190short-circuited 196string concatenation 185ternary 166, 167unary 166, 167, 177unary - 177unary + 177

optional operations 784ordered collections 779, 804ordering mode 823out of bounds 805outer object 362output 468output stream 468OutputStream class 475overflow 176, 1010overloaded 175overloaded method resolution 324overloading 717

constructors 51method resolution 324

PGJC3.book Page 1030 Tuesday, November 25, 2008 9:10 PM

Page 19: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1031

methods 47, 292overloading vs. overriding 292override 259

see @Overrideoverride-equivalent 717overriding

@Override 718equals 193, 751finalizers 396hashCode 760methods 288, 292override-equivalent 717toString 185

overriding methodscovariant return 290

overriding vs. overloading 292

Ppackage accessibility 132, 139package directory 115package statement 104, 106packages 105

accessibility see package accessibilitydeclaration 104definition 106destination directory 115hierarchy 105java.io 468java.lang 424java.util 777members 105naming scheme 106package directory 115running code from 117short-hand 108statement see package statementunnamed 106using 107

parametervarargs 90

parameter list see formal parametersparameter passing

by value 81variable arity 90

parameterized types 665, 705as formal parameters 707

parameters 44actual 81array elements 87final 89fixed arity 90

formal see formal parametersimplicit 45passing 81primitives 82references 84this 45variable arity 90

parent class 284parent pathname 471parentheses 166parse method 572parser 543, 571parseType method 434parsing

date/time 543numbers 547primitive values 576

parsing numeric values 434partial implementation 312partly synchronizing a method 630pass by value 81passing

parameters 81references 84variable arity parameters 90

passwordsreading from console 501

path lists 469path separator 468pathname 121, 468, 470paths

see class pathpaths of execution 614path-separator character 119Pattern 562pattern 554

application 563compile 554creating matcher 563engine 554see also regular expression

permutation 559permute elements 839persistence

see serializationpersistent objects 152polymorphic method 699polymorphism 319, 340, 345, 374polynomial 764positive zero 177possessive quantifiers 560postconditions 275, 376

PGJC3.book Page 1031 Tuesday, November 25, 2008 9:10 PM

Page 20: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1032 INDEX

postfix operators 167precedence rules 167precision 171, 596preconditions 275predefined identifiers 20predefined literals 21preempted threads 638preemptive scheduling 638prefix 22, 1006

0 22, 10060x 22, 1006

primitive types 13autoboxing 430unboxing 431see also primitive values

primitive valuesassignment 169binary representation 479equality 191passing 82

print writers 490priorities 638priority heap 783priority of thread 638priority queue 783private 11private members 143process-based multitasking 614processes 614program

application 15arguments 95compiling 16correctness 638formatting 26performance 638running 17

program arguments 95programmer exam 851promotion 165properties 2, 41, 122

-D option 122see also class members

propertyname 122value 122

protected 11protected members 141public 16public members 139

Qquantifiers 558questions 854queue 779, 783quotation mark 24, 25quote ’ 23quotient 178

Rrace condition 627radix

See base 431ragged arrays 76random access 806random order 839range 556

character values 29floating-point values 29integer values 28

range-view 800, 801, 805, 827raw types 670

unchecked warnings 670read access 470, 472readers 488reading bytes 475reading data 468Ready-to-run state 634reclaiming memory 390record 611

fields 611re-creating objects 510recursive bound 713reducing complexity 345reference types 32, 287

classes 40enum types 55

reference values 4reference variable 31reference variables 4references 4, 9, 31, 32, 81

abstract types 135aliases 193array 70, 73, 319assignment 169casting 165, 327dangling 390declared type 288downcasting 161dynamic type 288equality 192

PGJC3.book Page 1032 Tuesday, November 25, 2008 9:10 PM

Page 21: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1033

interface type 314narrowing conversions 161null see null referenceparameterized types 665passing 84raw types 682reachable 390, 391super 295, 373this 45, 373upcasting 161widening conversions 161

reflection 728regular expression 554

anchoring 557anchors 557automaton 554backtracking 559boundary macthers 557character 554character class 555concatenation 558empty string 558escaping metacharacters 561greedy quatifiers 559group 554, 563group logical operator 558intersection 556intervals 556lazy quantifiers 560logical AND 558logical operator 558logical OR 558longest possible match 559metacharacters 555negation 556non-metacharacters 555possessive quantifiers 560precedence of logical operators 558quantifiers 558range 556reluctant quantifiers 560reluctantness/laziness 560sequence of characters 554shortest possible match 560simple class 556subtraction 556union 556

reifiable types 722, 723relational operators 190relative pathnames 469reluctant quantifiers 560reluctantness/laziness 560

remainder 178remainder operator

% 178remove white space 449renaming files or directories 474repetition operators 558replacing characters 448reserved identifiers 20reserved keywords 21

const 21goto 223

reserved literalsfalse 23null see null referencetrue 23

reset 567resizable arrays 783, 806resources 392resurrecting objects 391retaining elements 785return statement 228return type

covariantreturn value 7reuse of code 284, 344rhyming order 772right associativity 168right-most bit 1010ripple effect 345role relationship 344Round-Robin scheduling 638Runnable interface 615, 620Running state 635runtime checks 164Runtime class 424runtime class 425runtime environment 390runtime stack 235, 390RuntimeException 241

Sscanner 571

delimiter pattern 574delimiters 571, 576exception handling 578lexical analyzer 571line-oriented 581lockstep 572lookahead 572lookahead methods 573lookahead-and-parse loop 572

PGJC3.book Page 1033 Tuesday, November 25, 2008 9:10 PM

Page 22: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1034 INDEX

multi-line mode 572, 581parse method 572parser 571parsing next token 575parsing primitive values 576source 571, 573token pattern 574tokenization 571tokenizer 571tokenizing mode 572tokens 571using delimiters and patterns 579

Scanner class 571schedulers 638scientific notation 22scope 129

block 131catch block 251class 129disjoint 132

search key 751searching 778, 838

arrays 843collections 840

searching in string 448SecurityManager class 424selection statements 204self-referential data structure 662semantic definition 20semicolon 45separators 468sequence 779sequential I/O 468serialization

customizing 517inheritance 519transient fields 516

serialization of objects 510services 345set 779

capacity 797load factor 797

set operation 680setter method 41shallow copying 425shared resource 626short 22, 28short-circuit 196

evaluation 197shortest possible match 560shuffle elements 839signature 47, 292, 716

significant digits 599simple

assignment operator 169if 204statement 45

simple class 556single implementation inheritance 286,

309, 313single quote 24single static import 109single-line comment 26single-quotes 23single-valued maps 821size of

file 471skeletal source file 104sleeping 640Sleeping state 635, 640sorted map 779, 780

comparator 827sorted set 779, 800, 801

comparator 801half-open interval 801

sorting 778, 838sorting arrays 842source 42, 571

file 15, 106file name 104file structure 104

source of data 468spaces 25spawning threads 615special character values 24specialization 11specialized classes 286splitting 451, 563

delimiters 563limit 564, 566

stack 3stack frame

See method execution 236stack trace 239

See method execution 236StackOverflowError 243standard error 499standard input 499standard output 499starting threads 616state see object statestatements 45

assert 265break 224

PGJC3.book Page 1034 Tuesday, November 25, 2008 9:10 PM

Page 23: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1035

compound 45conditional 204continue 226control flow 45, 204control transfer 223declarations 45do-while 217empty 45expression 45for(:) 220for(;;) 218if 204if-else 205iteration 216labeled 223return 228selection 204simple 45simple if 204switch 207throw 255transfer 223while 217

staticinitializer block 410members see static membersmethods 7, 10, 44variable initialization 33variables see static variables

static codeSee static context 40

static context 40static field 10static import 109

conflicts 112on demand 109shadow static members 111single static import 109

static initializer block 40static initializer blocks 276static keyword 109, 410static member classes 355

full name 356static members 8, 9, 10, 40static variables 7, 10, 35storing objects 152streams 468

chaining 479files 477filters 468, 477, 479of characters 488

streams of objects 477

strict formatter 544strictfp 177string

splitting 563string builders 186

appending 458capacity 456, 460constructing 457deleting 458differences with strings 458individual characters 457inserting 458length 457thread-safety 456

String classsee strings

string conversion 447string conversions 162, 598string literals 439

interned 440string pattern matching 554

splitting 563StringBuffer class 456

see string buildersthread-safe 456

StringBuilder class 456see string builders

StringIndexOutOfBoundsException 449, 457, 458

stringsappending 458buffers 456builders 456capacity 460changing case 446compareTo 445comparing 445, 766concatenation 185, 446concatenation operator + 186, 447constructing 457copying characters 443creating 439deleting 458differences with string builders 458equals 445extracting substrings 449finding index 448formatting of values 450ignoring case in comparison 445immutable 439individual characters 443, 457initializing 439

PGJC3.book Page 1035 Tuesday, November 25, 2008 9:10 PM

Page 24: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1036 INDEX

inserting 458interned 440length 443, 457lexicographical order 445literals 25mutable 456natural order 766pattern matching 451read character at index 443replacing 448searching 448splitting 451substrings 449trimming 449

strongly typed language 164subclass 10, 11, 12, 284subinterface 313sublist 805submap view 827subpackage 105subsequence 443subset 796, 798, 800, 801subsignature 718substring searching 448substrings 448, 449, 568subtraction 556subtype bivariance 675subtype contravariance 675subtype covariance 317, 318, 674, 675subtype invariance 675subtypes 312, 675, 686subtype-supertype relationship 161successive matching 567suffix

D 22F 22L 22

Sun Educational Services 852super

construct 305keyword 292, 295reference 295special form 366

super keyword 305superclass 10, 11, 284superclass–subclass relationship 286superinterfaces 313superset 798supertypes 312, 676supertype–subtype relationship 287supplementary characters 439SuppressWarnings see @SuppressWarnings

switch statement 207break 209default clause 208enum types 211

switching between threads 614synchronization 615, 626synchronized

blocks 629, 630, 631keyword 627methods 150, 627

syntactically legal 20System class 424system classes 269, 272system properties 122

TTAB see Horizontal tabtabs 25tabulators 25tagging interface

see marker interfacestags 27tail map view 827tail set view 800, 801telephone directory order 445terminal append-and-replace step 570terminating loops 224ternary conditional operator 166, 167, 201testing locations 853text files 492, 494text streams

see character streamstextual representation 425this

reference 45special form 363

this() constructor call 302, 417thread 390

live 390Thread class 615thread creation 615thread of execution 614thread safety 614thread-based multitasking 614ThreadDeath 242threads 424, 647

alive 615, 636blocked 626Blocked for I/O state 635Blocked for join completion state 635Blocked for lock acquisition state 635

PGJC3.book Page 1036 Tuesday, November 25, 2008 9:10 PM

Page 25: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1037

child 615, 619class 615code executed 616creation 615daemon 615dead state 635death 239determining state 635exception propagation 239extending Thread 619IllegalThreadStateException 615implemented by inner classes 622joining 637main 615names 617non-runnable state 635notification 640, 642notifying 426, 640priorities 638Ready-to-run state 634Runnable 615, 620running 619Running state 635scheduler 638sleeping 640Sleeping state 635, 640spawning 615starting 616, 620states 634status 615switching 614synchronization 150, 626synchronized 627termination 650Thread class 615transitions 634user 615wait set for 641waiting 426waiting for notification state 635yielding 639

thread-safe 439, 456, 784throw statement 255Throwable class 239, 424throwing exceptions 235throws clause 257time

see date and calendartime of day 535time-sliced scheduling 638token pattern 574tokenization 571

tokenize 563tokenizer 571tokenizing 572tokenizing mode 572tokens 20, 563, 571toString method 425, 431total order 765transfer statements 223transient fields 516transient variables 152transitive relation 287tree map 828tree set 802, 828trees 782trim 449true literal 23truth-values 23, 30try block 245try-catch-finally construct 245type cast 164type cast expression 327type declarations 104type erasure 670, 714type hierarchy 161, 287type import

see importtype information 662type instance 665type parameter constraints 684type parameters 310, 731

actual 665bounds 684formal 663recursive bounds 712restrictions 665

type safe 323type variables 663types

boolean 28, 30byte 22, 28casting 164char 29classes see classescomparing 328compatibility 164double 29exceptions 239float 29floating-point 28, 29int 22, 28integers 28, 29integral types 28

PGJC3.book Page 1037 Tuesday, November 25, 2008 9:10 PM

Page 26: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

1038 INDEX

long 22, 28nested 352parsing 434short 22, 28wrappers 428see also classes

UUML 2

accessibility 139aggregation 12classes 3inheritance 10see also diagrams

unary numeric promotion 165unary operators 166, 167unbounded type parameter 675, 677unbounded type references 684unbounded wildcard

? 675, 677unbounded wildcard references 682unboxing 431

assert statement 265do-while statement 217for(:) statement 221for(;;) statement 218if statement 204if-else statement 205switch statement 207while statement 217

unboxing conversions 162uncaught exceptions 239unchangeable variables 149unchecked call warning 671, 682unchecked cast warning 724unchecked conversion warning 671unchecked conversions 162unchecked exceptions 244unchecked generic array creation warning

729unchecked warnings 161, 671

@SuppressWarnings("unchecked") 726call warning 671, 682cast warning 724conversion warning 671generic array creation warning 729

underflow 176, 1010Unicode 23, 29, 488Unified Modeling Language see UMLunion 556, 796unsafe casts 329

unsupported operations 784, 821unused keywords 21upcasting 161upper bound 675, 685upper bounded wildcard

? extends T 675upper bounded wildcard references 682user threads 615using packages 107using variables 31UTF-16 439

supplementary characters 439

Vvalue 122value collection 821value objects 780valueOf method 430, 431, 450values 821, 1010

constants 21overflow 1010underflow 1010wrap-around 1010see also variables

varargsgeneric array creation 729

varargs calls 93varargs parameter 90variable arity method 90variable declarations 4, 31, 131variable initialization 8, 34variables 31

blank final 89, 149constant values 148declarations see variable declarationsdefault values 33final 148identifiers 31in interfaces 314initialization see variable initializationlifetime 35local 131parameters 44, 81reference variable 32references 32static 7storing 152transient 152volatile 153

vector 806Venn diagrams 785

PGJC3.book Page 1038 Tuesday, November 25, 2008 9:10 PM

Page 27: Index []khalid/pgjc3e/PGJC3_Index.pdf · INDEX 1017 name 105 nested see nested classes non-static member 352, 359 normal 135 Object 424 on-the-fly 352 parent 284 runtime 425 scope

INDEX 1039

view of list 805VirtualMachineError 242void 228, 429Void wrapper class 428volatile variables 153voucher 852

Wwait set 641waiting for conditions 641waiting for notification state 635waiting threads 426while statement 217white space 25, 449whole–part relationship 287widening conversions

primitive 160references 161

widening reference conversions 287, 328, 679

wider range 160width 596wildcard parameterized types 678

type hierarchy 676, 678wildcard types 675

see wildcards 675wildcards 673, 675

? 682

? extends T 682? super T 683assignment 679bounded 675capture 703capture conversion 705flexible comparisons 709nested 705parameterized types 678restrictions 677subtype relationships 673type hierarchy 676, 678

wrapper classes 28, 424, 428, 766wrapper types 162wrappers

interned 432write access 470, 472writers 488writing bytes 475

Yyielding 639

Zzero

negative 177positive 177

PGJC3.book Page 1039 Tuesday, November 25, 2008 9:10 PM