{"product_id":"ocp-oracle-certified-professional-java-se-17-developer-study-guide-9781119864585","title":"OCP Oracle Certified Professional Java SE 17","description":"\u003cb\u003eBook Synopsis\u003c\/b\u003e\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u003cb\u003eTable of Contents\u003c\/b\u003e\u003cbr\u003e\u003cp\u003eIntroduction xxiii\u003c\/p\u003e \u003cp\u003eAssessment Test xlv\u003cbr\u003e \u003cb\u003eChapter 1 Building Blocks 1\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eLearning about the Environment 2\u003c\/p\u003e \u003cp\u003eMajor Components of Java 2\u003c\/p\u003e \u003cp\u003eDownloading a JDK 3\u003c\/p\u003e \u003cp\u003eUnderstanding the Class Structure 4\u003c\/p\u003e \u003cp\u003eFields and Methods 4\u003c\/p\u003e \u003cp\u003eComments 5\u003c\/p\u003e \u003cp\u003eClasses and Source Files 7\u003c\/p\u003e \u003cp\u003eWriting a main() Method 8\u003c\/p\u003e \u003cp\u003eCreating a main() Method 8\u003c\/p\u003e \u003cp\u003ePassing Parameters to a Java Program 9\u003c\/p\u003e \u003cp\u003eUnderstanding Package Declarations and Imports 11\u003c\/p\u003e \u003cp\u003ePackages 12\u003c\/p\u003e \u003cp\u003eWildcards 13\u003c\/p\u003e \u003cp\u003eRedundant Imports 13\u003c\/p\u003e \u003cp\u003eNaming Conflicts 15\u003c\/p\u003e \u003cp\u003eCreating a New Package 16\u003c\/p\u003e \u003cp\u003eCompiling and Running Code with Packages 16\u003c\/p\u003e \u003cp\u003eCompiling to Another Directory 18\u003c\/p\u003e \u003cp\u003eCompiling with JAR Files 20\u003c\/p\u003e \u003cp\u003eCreating a JAR File 20\u003c\/p\u003e \u003cp\u003eOrdering Elements in a Class 21\u003c\/p\u003e \u003cp\u003eCreating Objects 23\u003c\/p\u003e \u003cp\u003eCalling Constructors 23\u003c\/p\u003e \u003cp\u003eReading and Writing Member Fields 24\u003c\/p\u003e \u003cp\u003eExecuting Instance Initializer Blocks 24\u003c\/p\u003e \u003cp\u003eFollowing the Order of Initialization 25\u003c\/p\u003e \u003cp\u003eUnderstanding Data Types 26\u003c\/p\u003e \u003cp\u003eUsing Primitive Types 27\u003c\/p\u003e \u003cp\u003eUsing Reference Types 29\u003c\/p\u003e \u003cp\u003eDistinguishing between Primitives and Reference Types 30\u003c\/p\u003e \u003cp\u003eCreating Wrapper Classes 31\u003c\/p\u003e \u003cp\u003eDefining Text Blocks 32\u003c\/p\u003e \u003cp\u003eDeclaring Variables 34\u003c\/p\u003e \u003cp\u003eIdentifying Identifiers 35\u003c\/p\u003e \u003cp\u003eDeclaring Multiple Variables 36\u003c\/p\u003e \u003cp\u003eInitializing Variables 38\u003c\/p\u003e \u003cp\u003eCreating Local Variables 38\u003c\/p\u003e \u003cp\u003ePassing Constructor and Method Parameters 40\u003c\/p\u003e \u003cp\u003eDefining Instance and Class Variables 41\u003c\/p\u003e \u003cp\u003eInferring the Type with var 41\u003c\/p\u003e \u003cp\u003eManaging Variable Scope 45\u003c\/p\u003e \u003cp\u003eLimiting Scope 45\u003c\/p\u003e \u003cp\u003eTracing Scope 46\u003c\/p\u003e \u003cp\u003eApplying Scope to Classes 47\u003c\/p\u003e \u003cp\u003eReviewing Scope 48\u003c\/p\u003e \u003cp\u003eDestroying Objects 48\u003c\/p\u003e \u003cp\u003eUnderstanding Garbage Collection 48\u003c\/p\u003e \u003cp\u003eTracing Eligibility 49\u003c\/p\u003e \u003cp\u003eSummary 51\u003c\/p\u003e \u003cp\u003eExam Essentials 52\u003c\/p\u003e \u003cp\u003eReview Questions 54\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 2 Operators 65\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding Java Operators 66\u003c\/p\u003e \u003cp\u003eTypes of Operators 66\u003c\/p\u003e \u003cp\u003eOperator Precedence 67\u003c\/p\u003e \u003cp\u003eApplying Unary Operators 69\u003c\/p\u003e \u003cp\u003eComplement and Negation Operators 70\u003c\/p\u003e \u003cp\u003eIncrement and Decrement Operators 71\u003c\/p\u003e \u003cp\u003eWorking with Binary Arithmetic Operators 72\u003c\/p\u003e \u003cp\u003eArithmetic Operators 72\u003c\/p\u003e \u003cp\u003eNumeric Promotion 75\u003c\/p\u003e \u003cp\u003eAssigning Values 77\u003c\/p\u003e \u003cp\u003eAssignment Operator 77\u003c\/p\u003e \u003cp\u003eCasting Values 77\u003c\/p\u003e \u003cp\u003eCompound Assignment Operators 81\u003c\/p\u003e \u003cp\u003eReturn Value of Assignment Operators 82\u003c\/p\u003e \u003cp\u003eComparing Values 83\u003c\/p\u003e \u003cp\u003eEquality Operators 83\u003c\/p\u003e \u003cp\u003eRelational Operators 84\u003c\/p\u003e \u003cp\u003eLogical Operators 87\u003c\/p\u003e \u003cp\u003eConditional Operators 88\u003c\/p\u003e \u003cp\u003eMaking Decisions with the Ternary Operator 90\u003c\/p\u003e \u003cp\u003eSummary 92\u003c\/p\u003e \u003cp\u003eExam Essentials 92\u003c\/p\u003e \u003cp\u003eReview Questions 94\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 3 Making Decisions 101\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eCreating Decision- Making Statements 102\u003c\/p\u003e \u003cp\u003eStatements and Blocks 102\u003c\/p\u003e \u003cp\u003eThe if Statement 103\u003c\/p\u003e \u003cp\u003eThe else Statement 104\u003c\/p\u003e \u003cp\u003eShortening Code with Pattern Matching 106\u003c\/p\u003e \u003cp\u003eApplying switch Statements 110\u003c\/p\u003e \u003cp\u003eThe switch Statement 110\u003c\/p\u003e \u003cp\u003eThe switch Expression 115\u003c\/p\u003e \u003cp\u003eWriting while Loops 121\u003c\/p\u003e \u003cp\u003eThe while Statement 121\u003c\/p\u003e \u003cp\u003eThe do\/while Statement 123\u003c\/p\u003e \u003cp\u003eInfinite Loops 123\u003c\/p\u003e \u003cp\u003eConstructing for Loops 124\u003c\/p\u003e \u003cp\u003eThe for Loop 124\u003c\/p\u003e \u003cp\u003eThe for- each Loop 129\u003c\/p\u003e \u003cp\u003eControlling Flow with Branching 131\u003c\/p\u003e \u003cp\u003eNested Loops 131\u003c\/p\u003e \u003cp\u003eAdding Optional Labels 132\u003c\/p\u003e \u003cp\u003eThe break Statement 133\u003c\/p\u003e \u003cp\u003eThe continue Statement 135\u003c\/p\u003e \u003cp\u003eThe return Statement 137\u003c\/p\u003e \u003cp\u003eUnreachable Code 138\u003c\/p\u003e \u003cp\u003eReviewing Branching 139\u003c\/p\u003e \u003cp\u003eSummary 139\u003c\/p\u003e \u003cp\u003eExam Essentials 140\u003c\/p\u003e \u003cp\u003eReview Questions 142\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 4 Core APIs 155\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eCreating and Manipulating Strings 156\u003c\/p\u003e \u003cp\u003eConcatenating 157\u003c\/p\u003e \u003cp\u003eImportant String Methods 158\u003c\/p\u003e \u003cp\u003eMethod Chaining 169\u003c\/p\u003e \u003cp\u003eUsing the StringBuilder Class 170\u003c\/p\u003e \u003cp\u003eMutability and Chaining 171\u003c\/p\u003e \u003cp\u003eCreating a StringBuilder 172\u003c\/p\u003e \u003cp\u003eImportant StringBuilder Methods 172\u003c\/p\u003e \u003cp\u003eUnderstanding Equality 175\u003c\/p\u003e \u003cp\u003eComparing equals() and == 175\u003c\/p\u003e \u003cp\u003eThe String Pool 176\u003c\/p\u003e \u003cp\u003eUnderstanding Arrays 178\u003c\/p\u003e \u003cp\u003eCreating an Array of Primitives 179\u003c\/p\u003e \u003cp\u003eCreating an Array with Reference Variables 180\u003c\/p\u003e \u003cp\u003eUsing an Array 182\u003c\/p\u003e \u003cp\u003eSorting 183\u003c\/p\u003e \u003cp\u003eSearching 184\u003c\/p\u003e \u003cp\u003eComparing 185\u003c\/p\u003e \u003cp\u003eUsing Methods with Varargs 187\u003c\/p\u003e \u003cp\u003eWorking with Multidimensional Arrays 188\u003c\/p\u003e \u003cp\u003eCalculating with Math APIs 190\u003c\/p\u003e \u003cp\u003eFinding the Minimum and Maximum 190\u003c\/p\u003e \u003cp\u003eRounding Numbers 191\u003c\/p\u003e \u003cp\u003eDetermining the Ceiling and Floor 191\u003c\/p\u003e \u003cp\u003eCalculating Exponents 192\u003c\/p\u003e \u003cp\u003eGenerating Random Numbers 192\u003c\/p\u003e \u003cp\u003eWorking with Dates and Times 192\u003c\/p\u003e \u003cp\u003eCreating Dates and Times 193\u003c\/p\u003e \u003cp\u003eManipulating Dates and Times 197\u003c\/p\u003e \u003cp\u003eWorking with Periods 199\u003c\/p\u003e \u003cp\u003eWorking with Durations 202\u003cbr\u003e Period vs. Duration 204\u003c\/p\u003e \u003cp\u003eWorking with Instants 205\u003c\/p\u003e \u003cp\u003eAccounting for Daylight Saving Time 206\u003c\/p\u003e \u003cp\u003eSummary 208\u003c\/p\u003e \u003cp\u003eExam Essentials 209\u003c\/p\u003e \u003cp\u003eReview Questions 210\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 5 Methods 219\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eDesigning Methods 220\u003c\/p\u003e \u003cp\u003eAccess Modifiers 221\u003c\/p\u003e \u003cp\u003eOptional Specifiers 222\u003c\/p\u003e \u003cp\u003eReturn Type 224\u003c\/p\u003e \u003cp\u003eMethod Name 226\u003c\/p\u003e \u003cp\u003eParameter List 226\u003c\/p\u003e \u003cp\u003eMethod Signature 227\u003c\/p\u003e \u003cp\u003eException List 227\u003c\/p\u003e \u003cp\u003eMethod Body 228\u003c\/p\u003e \u003cp\u003eDeclaring Local and Instance Variables 228\u003c\/p\u003e \u003cp\u003eLocal Variable Modifiers 229\u003c\/p\u003e \u003cp\u003eEffectively Final Variables 230\u003c\/p\u003e \u003cp\u003eInstance Variable Modifiers 231\u003c\/p\u003e \u003cp\u003eWorking with Varargs 232\u003c\/p\u003e \u003cp\u003eCreating Methods with Varargs 232\u003c\/p\u003e \u003cp\u003eCalling Methods with Varargs 233\u003c\/p\u003e \u003cp\u003eAccessing Elements of a Vararg 234\u003c\/p\u003e \u003cp\u003eUsing Varargs with Other Method Parameters 234\u003c\/p\u003e \u003cp\u003eApplying Access Modifiers 235\u003c\/p\u003e \u003cp\u003ePrivate Access 235\u003c\/p\u003e \u003cp\u003ePackage Access 236\u003c\/p\u003e \u003cp\u003eProtected Access 237\u003c\/p\u003e \u003cp\u003ePublic Access 242\u003c\/p\u003e \u003cp\u003eReviewing Access Modifiers 242\u003c\/p\u003e \u003cp\u003eAccessing static Data 243\u003c\/p\u003e \u003cp\u003eDesigning static Methods and Variables 243\u003c\/p\u003e \u003cp\u003eAccessing a static Variable or Method 244\u003c\/p\u003e \u003cp\u003eClass vs. Instance Membership 245\u003cbr\u003e Static Variable Modifiers 248\u003cbr\u003e Static Initializers 250\u003cbr\u003e Static Imports 251\u003c\/p\u003e \u003cp\u003ePassing Data among Methods 253\u003c\/p\u003e \u003cp\u003ePassing Objects 253\u003c\/p\u003e \u003cp\u003eReturning Objects 255\u003c\/p\u003e \u003cp\u003eAutoboxing and Unboxing Variables 256\u003c\/p\u003e \u003cp\u003eOverloading Methods 258\u003c\/p\u003e \u003cp\u003eReference Types 259\u003c\/p\u003e \u003cp\u003ePrimitives 260\u003c\/p\u003e \u003cp\u003eAutoboxing 261\u003c\/p\u003e \u003cp\u003eArrays 261\u003c\/p\u003e \u003cp\u003eVarargs 261\u003c\/p\u003e \u003cp\u003ePutting It All Together 262\u003c\/p\u003e \u003cp\u003eSummary 263\u003c\/p\u003e \u003cp\u003eExam Essentials 264\u003c\/p\u003e \u003cp\u003eReview Questions 265\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 6 Class Design 275\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding Inheritance 276\u003c\/p\u003e \u003cp\u003eDeclaring a Subclass 276\u003c\/p\u003e \u003cp\u003eClass Modifiers 278\u003c\/p\u003e \u003cp\u003eSingle vs. Multiple Inheritance 279\u003c\/p\u003e \u003cp\u003eInheriting Object 279\u003c\/p\u003e \u003cp\u003eCreating Classes 281\u003c\/p\u003e \u003cp\u003eExtending a Class 281\u003c\/p\u003e \u003cp\u003eApplying Class Access Modifiers 282\u003c\/p\u003e \u003cp\u003eAccessing the this Reference 283\u003c\/p\u003e \u003cp\u003eCalling the super Reference 284\u003c\/p\u003e \u003cp\u003eDeclaring Constructors 286\u003c\/p\u003e \u003cp\u003eCreating a Constructor 286\u003c\/p\u003e \u003cp\u003eThe Default Constructor 287\u003c\/p\u003e \u003cp\u003eCalling Overloaded Constructors with this() 289\u003c\/p\u003e \u003cp\u003eCalling Parent Constructors with super() 292\u003c\/p\u003e \u003cp\u003eInitializing Objects 297\u003c\/p\u003e \u003cp\u003eInitializing Classes 297\u003c\/p\u003e \u003cp\u003eInitializing final Fields 298\u003c\/p\u003e \u003cp\u003eInitializing Instances 300\u003c\/p\u003e \u003cp\u003eInheriting Members 304\u003c\/p\u003e \u003cp\u003eOverriding a Method 305\u003c\/p\u003e \u003cp\u003eRedeclaring private Methods 311\u003c\/p\u003e \u003cp\u003eHiding Static Methods 311\u003c\/p\u003e \u003cp\u003eHiding Variables 313\u003c\/p\u003e \u003cp\u003eWriting final Methods 314\u003c\/p\u003e \u003cp\u003eCreating Abstract Classes 315\u003c\/p\u003e \u003cp\u003eIntroducing Abstract Classes 315\u003c\/p\u003e \u003cp\u003eDeclaring Abstract Methods 317\u003c\/p\u003e \u003cp\u003eCreating a Concrete Class 318\u003c\/p\u003e \u003cp\u003eCreating Constructors in Abstract Classes 320\u003c\/p\u003e \u003cp\u003eSpotting Invalid Declarations 321\u003c\/p\u003e \u003cp\u003eCreating Immutable Objects 323\u003c\/p\u003e \u003cp\u003eDeclaring an Immutable Class 323\u003c\/p\u003e \u003cp\u003ePerforming a Defensive Copy 325\u003c\/p\u003e \u003cp\u003eSummary 326\u003c\/p\u003e \u003cp\u003eExam Essentials 327\u003c\/p\u003e \u003cp\u003eReview Questions 330\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 7 Beyond Classes 345\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eImplementing Interfaces 346\u003c\/p\u003e \u003cp\u003eDeclaring and Using an Interface 346\u003c\/p\u003e \u003cp\u003eExtending an Interface 348\u003c\/p\u003e \u003cp\u003eInheriting an Interface 349\u003c\/p\u003e \u003cp\u003eInserting Implicit Modifiers 351\u003c\/p\u003e \u003cp\u003eDeclaring Concrete Interface Methods 353\u003c\/p\u003e \u003cp\u003eWorking with Enums 361\u003c\/p\u003e \u003cp\u003eCreating Simple Enums 361\u003c\/p\u003e \u003cp\u003eUsing Enums in switch Statements 363\u003c\/p\u003e \u003cp\u003eAdding Constructors, Fields, and Methods 364\u003c\/p\u003e \u003cp\u003eSealing Classes 367\u003c\/p\u003e \u003cp\u003eDeclaring a Sealed Class 367\u003c\/p\u003e \u003cp\u003eCompiling Sealed Classes 368\u003c\/p\u003e \u003cp\u003eSpecifying the Subclass Modifier 369\u003c\/p\u003e \u003cp\u003eOmitting the permits Clause 370\u003c\/p\u003e \u003cp\u003eSealing Interfaces 372\u003c\/p\u003e \u003cp\u003eReviewing Sealed Class Rules 372\u003c\/p\u003e \u003cp\u003eEncapsulating Data with Records 373\u003c\/p\u003e \u003cp\u003eUnderstanding Encapsulation 374\u003c\/p\u003e \u003cp\u003eApplying Records 375\u003c\/p\u003e \u003cp\u003eUnderstanding Record Immutability 377\u003c\/p\u003e \u003cp\u003eDeclaring Constructors 378\u003c\/p\u003e \u003cp\u003eCustomizing Records 381\u003c\/p\u003e \u003cp\u003eCreating Nested Classes 382\u003c\/p\u003e \u003cp\u003eDeclaring an Inner Class 382\u003c\/p\u003e \u003cp\u003eCreating a static Nested Class 386\u003c\/p\u003e \u003cp\u003eWriting a Local Class 387\u003c\/p\u003e \u003cp\u003eDefining an Anonymous Class 389\u003c\/p\u003e \u003cp\u003eReviewing Nested Classes 391\u003c\/p\u003e \u003cp\u003eUnderstanding Polymorphism 392\u003c\/p\u003e \u003cp\u003eObject vs. Reference 393\u003c\/p\u003e \u003cp\u003eCasting Objects 395\u003c\/p\u003e \u003cp\u003eThe instanceof Operator 397\u003c\/p\u003e \u003cp\u003ePolymorphism and Method Overriding 397\u003c\/p\u003e \u003cp\u003eOverriding vs. Hiding Members 399\u003c\/p\u003e \u003cp\u003eSummary 401\u003c\/p\u003e \u003cp\u003eExam Essentials 402\u003c\/p\u003e \u003cp\u003eReview Questions 404\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 8 Lambdas and Functional Interfaces 419\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eWriting Simple Lambdas 420\u003c\/p\u003e \u003cp\u003eLooking at a Lambda Example 420\u003c\/p\u003e \u003cp\u003eLearning Lambda Syntax 422\u003c\/p\u003e \u003cp\u003eCoding Functional Interfaces 426\u003c\/p\u003e \u003cp\u003eDefining a Functional Interface 426\u003c\/p\u003e \u003cp\u003eAdding Object Methods 427\u003c\/p\u003e \u003cp\u003eUsing Method References 429\u003c\/p\u003e \u003cp\u003eCalling static Methods 430\u003c\/p\u003e \u003cp\u003eCalling Instance Methods on a Particular Object 430\u003c\/p\u003e \u003cp\u003eCalling Instance Methods on a Parameter 432\u003c\/p\u003e \u003cp\u003eCalling Constructors 433\u003c\/p\u003e \u003cp\u003eReviewing Method References 433\u003c\/p\u003e \u003cp\u003eWorking with Built- in Functional Interfaces 434\u003c\/p\u003e \u003cp\u003eImplementing Supplier 435\u003c\/p\u003e \u003cp\u003eImplementing Consumer and BiConsumer 436\u003c\/p\u003e \u003cp\u003eImplementing Predicate and BiPredicate 438\u003c\/p\u003e \u003cp\u003eImplementing Function and BiFunction 439\u003c\/p\u003e \u003cp\u003eImplementing UnaryOperator and BinaryOperator 440\u003c\/p\u003e \u003cp\u003eChecking Functional Interfaces 441\u003c\/p\u003e \u003cp\u003eUsing Convenience Methods on Functional Interfaces 442\u003c\/p\u003e \u003cp\u003eLearning the Functional Interfaces for Primitives 443\u003c\/p\u003e \u003cp\u003eWorking with Variables in Lambdas 445\u003c\/p\u003e \u003cp\u003eListing Parameters 446\u003c\/p\u003e \u003cp\u003eUsing Local Variables inside a Lambda Body 448\u003c\/p\u003e \u003cp\u003eReferencing Variables from the Lambda Body 449\u003c\/p\u003e \u003cp\u003eSummary 450\u003c\/p\u003e \u003cp\u003eExam Essentials 451\u003c\/p\u003e \u003cp\u003eReview Questions 452\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 9 Collections and Generics 463\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUsing Common Collection APIs 464\u003c\/p\u003e \u003cp\u003eUsing the Diamond Operator 465\u003c\/p\u003e \u003cp\u003eAdding Data 466\u003c\/p\u003e \u003cp\u003eRemoving Data 466\u003c\/p\u003e \u003cp\u003eCounting Elements 467\u003c\/p\u003e \u003cp\u003eClearing the Collection 467\u003c\/p\u003e \u003cp\u003eCheck Contents 468\u003c\/p\u003e \u003cp\u003eRemoving with Conditions 468\u003c\/p\u003e \u003cp\u003eIterating 469\u003c\/p\u003e \u003cp\u003eDetermining Equality 470\u003c\/p\u003e \u003cp\u003eUsing the List Interface 471\u003c\/p\u003e \u003cp\u003eComparing List Implementations 472\u003c\/p\u003e \u003cp\u003eCreating a List with a Factory 472\u003c\/p\u003e \u003cp\u003eCreating a List with a Constructor 473\u003c\/p\u003e \u003cp\u003eWorking with List Methods 474\u003c\/p\u003e \u003cp\u003eConverting from List to an Array 476\u003c\/p\u003e \u003cp\u003eUsing the Set Interface 477\u003c\/p\u003e \u003cp\u003eComparing Set Implementations 477\u003c\/p\u003e \u003cp\u003eWorking with Set Methods 478\u003c\/p\u003e \u003cp\u003eUsing the Queue and Deque Interfaces 479\u003c\/p\u003e \u003cp\u003eComparing Deque Implementations 480\u003c\/p\u003e \u003cp\u003eWorking with Queue and Deque Methods 480\u003c\/p\u003e \u003cp\u003eUsing the Map Interface 483\u003c\/p\u003e \u003cp\u003eComparing Map Implementations 484\u003c\/p\u003e \u003cp\u003eWorking with Map Methods 484\u003c\/p\u003e \u003cp\u003eCalling Basic Methods 486\u003c\/p\u003e \u003cp\u003eIterating through a Map 487\u003c\/p\u003e \u003cp\u003eGetting Values Safely 487\u003c\/p\u003e \u003cp\u003eReplacing Values 488\u003c\/p\u003e \u003cp\u003ePutting if Absent 488\u003c\/p\u003e \u003cp\u003eMerging Data 488\u003c\/p\u003e \u003cp\u003eComparing Collection Types 490\u003c\/p\u003e \u003cp\u003eSorting Data 492\u003c\/p\u003e \u003cp\u003eCreating a Comparable Class 492\u003c\/p\u003e \u003cp\u003eComparing Data with a Comparator 496\u003c\/p\u003e \u003cp\u003eComparing Comparable and Comparator 497\u003c\/p\u003e \u003cp\u003eComparing Multiple Fields 498\u003c\/p\u003e \u003cp\u003eSorting and Searching 500\u003c\/p\u003e \u003cp\u003eSorting a List 503\u003c\/p\u003e \u003cp\u003eWorking with Generics 503\u003c\/p\u003e \u003cp\u003eCreating Generic Classes 504\u003c\/p\u003e \u003cp\u003eUnderstanding Type Erasure 506\u003c\/p\u003e \u003cp\u003eImplementing Generic Interfaces 509\u003c\/p\u003e \u003cp\u003eWriting Generic Methods 510\u003c\/p\u003e \u003cp\u003eCreating a Generic Record 512\u003c\/p\u003e \u003cp\u003eBounding Generic Types 512\u003c\/p\u003e \u003cp\u003ePutting It All Together 517\u003c\/p\u003e \u003cp\u003eSummary 519\u003c\/p\u003e \u003cp\u003eExam Essentials 520\u003c\/p\u003e \u003cp\u003eReview Questions 521\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 10 Streams 531\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eReturning an Optional 532\u003c\/p\u003e \u003cp\u003eCreating an Optional 533\u003c\/p\u003e \u003cp\u003eDealing with an Empty Optional 534\u003c\/p\u003e \u003cp\u003eUsing Streams 536\u003c\/p\u003e \u003cp\u003eUnderstanding the Pipeline Flow 536\u003c\/p\u003e \u003cp\u003eCreating Stream Sources 539\u003c\/p\u003e \u003cp\u003eUsing Common Terminal Operations 541\u003c\/p\u003e \u003cp\u003eUsing Common Intermediate Operations 549\u003c\/p\u003e \u003cp\u003ePutting Together the Pipeline 553\u003c\/p\u003e \u003cp\u003eWorking with Primitive Streams 557\u003c\/p\u003e \u003cp\u003eCreating Primitive Streams 557\u003c\/p\u003e \u003cp\u003eMapping Streams 560\u003c\/p\u003e \u003cp\u003eUsing Optional with Primitive Streams 562\u003c\/p\u003e \u003cp\u003eSummarizing Statistics 564\u003c\/p\u003e \u003cp\u003eWorking with Advanced Stream Pipeline Concepts 565\u003c\/p\u003e \u003cp\u003eLinking Streams to the Underlying Data 565\u003c\/p\u003e \u003cp\u003eChaining Optionals 566\u003c\/p\u003e \u003cp\u003eUsing a Spliterator 569\u003c\/p\u003e \u003cp\u003eCollecting Results 570\u003c\/p\u003e \u003cp\u003eSummary 578\u003c\/p\u003e \u003cp\u003eExam Essentials 579\u003c\/p\u003e \u003cp\u003eReview Questions 581\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 11 Exceptions and Localization 591\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding Exceptions 592\u003c\/p\u003e \u003cp\u003eThe Role of Exceptions 592\u003c\/p\u003e \u003cp\u003eUnderstanding Exception Types 593\u003c\/p\u003e \u003cp\u003eThrowing an Exception 596\u003c\/p\u003e \u003cp\u003eCalling Methods That Throw Exceptions 598\u003c\/p\u003e \u003cp\u003eOverriding Methods with Exceptions 599\u003c\/p\u003e \u003cp\u003ePrinting an Exception 600\u003c\/p\u003e \u003cp\u003eRecognizing Exception Classes 600\u003cbr\u003e RuntimeException Classes 601\u003c\/p\u003e \u003cp\u003eChecked Exception Classes 604\u003cbr\u003e Error Classes 605\u003c\/p\u003e \u003cp\u003eHandling Exceptions 605\u003c\/p\u003e \u003cp\u003eUsing try and catch Statements 606\u003c\/p\u003e \u003cp\u003eChaining catch Blocks 607\u003c\/p\u003e \u003cp\u003eApplying a Multi- catch Block 609\u003c\/p\u003e \u003cp\u003eAdding a finally Block 611\u003c\/p\u003e \u003cp\u003eAutomating Resource Management 615\u003c\/p\u003e \u003cp\u003eIntroducing Try- with- Resources 615\u003c\/p\u003e \u003cp\u003eBasics of Try- with- Resources 616\u003c\/p\u003e \u003cp\u003eApplying Effectively Final 620\u003c\/p\u003e \u003cp\u003eUnderstanding Suppressed Exceptions 621\u003c\/p\u003e \u003cp\u003eFormatting Values 624\u003c\/p\u003e \u003cp\u003eFormatting Numbers 624\u003c\/p\u003e \u003cp\u003eFormatting Dates and Times 625\u003c\/p\u003e \u003cp\u003eCustomizing the Date\/Time Format 626\u003c\/p\u003e \u003cp\u003eSupporting Internationalization and Localization 629\u003c\/p\u003e \u003cp\u003ePicking a Locale 630\u003c\/p\u003e \u003cp\u003eLocalizing Numbers 632\u003c\/p\u003e \u003cp\u003eLocalizing Dates 637\u003c\/p\u003e \u003cp\u003eSpecifying a Locale Category 638\u003c\/p\u003e \u003cp\u003eLoading Properties with Resource Bundles 639\u003c\/p\u003e \u003cp\u003eCreating a Resource Bundle 640\u003c\/p\u003e \u003cp\u003ePicking a Resource Bundle 641\u003c\/p\u003e \u003cp\u003eSelecting Resource Bundle Values 643\u003c\/p\u003e \u003cp\u003eFormatting Messages 645\u003c\/p\u003e \u003cp\u003eUsing the Properties Class 645\u003c\/p\u003e \u003cp\u003eSummary 646\u003c\/p\u003e \u003cp\u003eExam Essentials 647\u003c\/p\u003e \u003cp\u003eReview Questions 648\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 12 Modules 661\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eIntroducing Modules 662\u003c\/p\u003e \u003cp\u003eExploring a Module 663\u003c\/p\u003e \u003cp\u003eBenefits of Modules 664\u003c\/p\u003e \u003cp\u003eCreating and Running a Modular Program 664\u003c\/p\u003e \u003cp\u003eCreating the Files 665\u003c\/p\u003e \u003cp\u003eCompiling Our First Module 666\u003c\/p\u003e \u003cp\u003eRunning Our First Module 668\u003c\/p\u003e \u003cp\u003ePackaging Our First Module 669\u003c\/p\u003e \u003cp\u003eUpdating Our Example for Multiple Modules 669\u003c\/p\u003e \u003cp\u003eUpdating the Feeding Module 670\u003c\/p\u003e \u003cp\u003eCreating a Care Module 670\u003c\/p\u003e \u003cp\u003eCreating the Talks Module 672\u003c\/p\u003e \u003cp\u003eCreating the Staff Module 674\u003c\/p\u003e \u003cp\u003eDiving into the Module Declaration 675\u003c\/p\u003e \u003cp\u003eExporting a Package 676\u003c\/p\u003e \u003cp\u003eRequiring a Module Transitively 677\u003c\/p\u003e \u003cp\u003eOpening a Package 679\u003c\/p\u003e \u003cp\u003eCreating a Service 680\u003c\/p\u003e \u003cp\u003eDeclaring the Service Provider Interface 681\u003c\/p\u003e \u003cp\u003eCreating a Service Locator 682\u003c\/p\u003e \u003cp\u003eInvoking from a Consumer 684\u003c\/p\u003e \u003cp\u003eAdding a Service Provider 685\u003c\/p\u003e \u003cp\u003eReviewing Directives and Services 686\u003c\/p\u003e \u003cp\u003eDiscovering Modules 687\u003c\/p\u003e \u003cp\u003eIdentifying Built- in Modules 688\u003c\/p\u003e \u003cp\u003eGetting Details with java 690\u003c\/p\u003e \u003cp\u003eDescribing with jar 693\u003c\/p\u003e \u003cp\u003eLearning about Dependencies with jdeps 693\u003c\/p\u003e \u003cp\u003eUsing the -- jdk- internals Flag 695\u003c\/p\u003e \u003cp\u003eUsing Module Files with jmod 696\u003c\/p\u003e \u003cp\u003eCreating Java Runtimes with jlink 696\u003c\/p\u003e \u003cp\u003eReviewing Command- Line Options 697\u003c\/p\u003e \u003cp\u003eComparing Types of Modules 700\u003c\/p\u003e \u003cp\u003eNamed Modules 701\u003c\/p\u003e \u003cp\u003eAutomatic Modules 701\u003c\/p\u003e \u003cp\u003eUnnamed Modules 704\u003c\/p\u003e \u003cp\u003eReviewing Module Types 704\u003c\/p\u003e \u003cp\u003eMigrating an Application 704\u003c\/p\u003e \u003cp\u003eDetermining the Order 705\u003c\/p\u003e \u003cp\u003eExploring a Bottom- Up Migration Strategy 706\u003c\/p\u003e \u003cp\u003eExploring a Top- Down Migration Strategy 707\u003c\/p\u003e \u003cp\u003eSplitting a Big Project into Modules 709\u003c\/p\u003e \u003cp\u003eFailing to Compile with a Cyclic Dependency 709\u003c\/p\u003e \u003cp\u003eSummary 711\u003c\/p\u003e \u003cp\u003eExam Essentials 712\u003c\/p\u003e \u003cp\u003eReview Questions 713\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 13 Concurrency 721\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eIntroducing Threads 722\u003c\/p\u003e \u003cp\u003eUnderstanding Thread Concurrency 723\u003c\/p\u003e \u003cp\u003eCreating a Thread 724\u003c\/p\u003e \u003cp\u003eDistinguishing Thread Types 725\u003c\/p\u003e \u003cp\u003eManaging a Thread’s Life Cycle 727\u003c\/p\u003e \u003cp\u003ePolling with Sleep 727\u003c\/p\u003e \u003cp\u003eInterrupting a Thread 729\u003c\/p\u003e \u003cp\u003eCreating Threads with the Concurrency API 730\u003c\/p\u003e \u003cp\u003eIntroducing the Single- Thread Executor 730\u003c\/p\u003e \u003cp\u003eShutting Down a Thread Executor 731\u003c\/p\u003e \u003cp\u003eSubmitting Tasks 732\u003c\/p\u003e \u003cp\u003eWaiting for Results 733\u003c\/p\u003e \u003cp\u003eScheduling Tasks 737\u003c\/p\u003e \u003cp\u003eIncreasing Concurrency with Pools 739\u003c\/p\u003e \u003cp\u003eWriting Thread- Safe Code 740\u003c\/p\u003e \u003cp\u003eUnderstanding Thread- Safety 740\u003c\/p\u003e \u003cp\u003eAccessing Data with volatile 741\u003c\/p\u003e \u003cp\u003eProtecting Data with Atomic Classes 742\u003c\/p\u003e \u003cp\u003eImproving Access with Synchronized Blocks 744\u003c\/p\u003e \u003cp\u003eSynchronizing on Methods 746\u003c\/p\u003e \u003cp\u003eUnderstanding the Lock Framework 747\u003c\/p\u003e \u003cp\u003eOrchestrating Tasks with a CyclicBarrier 751\u003c\/p\u003e \u003cp\u003eUsing Concurrent Collections 754\u003c\/p\u003e \u003cp\u003eUnderstanding Memory Consistency Errors 754\u003c\/p\u003e \u003cp\u003eWorking with Concurrent Classes 755\u003c\/p\u003e \u003cp\u003eObtaining Synchronized Collections 757\u003c\/p\u003e \u003cp\u003eIdentifying Threading Problems 758\u003c\/p\u003e \u003cp\u003eUnderstanding Liveness 758\u003c\/p\u003e \u003cp\u003eManaging Race Conditions 761\u003c\/p\u003e \u003cp\u003eWorking with Parallel Streams 761\u003c\/p\u003e \u003cp\u003eCreating Parallel Streams 762\u003c\/p\u003e \u003cp\u003ePerforming a Parallel Decomposition 762\u003c\/p\u003e \u003cp\u003eProcessing Parallel Reductions 764\u003c\/p\u003e \u003cp\u003eSummary 770\u003c\/p\u003e \u003cp\u003eExam Essentials 770\u003c\/p\u003e \u003cp\u003eReview Questions 772\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 14 I\/o 785\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eReferencing Files and Directories 786\u003c\/p\u003e \u003cp\u003eConceptualizing the File System 786\u003c\/p\u003e \u003cp\u003eCreating a File or Path 789\u003c\/p\u003e \u003cp\u003eOperating on File and Path 793\u003c\/p\u003e \u003cp\u003eUsing Shared Functionality 793\u003c\/p\u003e \u003cp\u003eHandling Methods That Declare IOException 797\u003c\/p\u003e \u003cp\u003eProviding NIO.2 Optional Parameters 797\u003c\/p\u003e \u003cp\u003eInteracting with NIO.2 Paths 799\u003c\/p\u003e \u003cp\u003eCreating, Moving, and Deleting Files and Directories 805\u003c\/p\u003e \u003cp\u003eComparing Files with isSameFile() and mismatch() 809\u003c\/p\u003e \u003cp\u003eIntroducing I\/O Streams 811\u003c\/p\u003e \u003cp\u003eUnderstanding I\/O Stream Fundamentals 811\u003c\/p\u003e \u003cp\u003eLearning I\/O Stream Nomenclature 812\u003c\/p\u003e \u003cp\u003eReading and Writing Files 817\u003c\/p\u003e \u003cp\u003eUsing I\/O Streams 817\u003c\/p\u003e \u003cp\u003eEnhancing with Files 820\u003c\/p\u003e \u003cp\u003eCombining with newBufferedReader() and newBufferedWriter() 822\u003c\/p\u003e \u003cp\u003eReviewing Common Read and Write Methods 823\u003c\/p\u003e \u003cp\u003eSerializing Data 824\u003c\/p\u003e \u003cp\u003eApplying the Serializable Interface 825\u003c\/p\u003e \u003cp\u003eMarking Data transient 827\u003c\/p\u003e \u003cp\u003eEnsuring That a Class Is Serializable 827\u003c\/p\u003e \u003cp\u003eStoring Data with ObjectOutputStream and \u003ci\u003eObjectInputStream 828\u003c\/i\u003e\u003c\/p\u003e \u003cp\u003eUnderstanding the Deserialization Creation Process 830\u003c\/p\u003e \u003cp\u003eInteracting with Users 832\u003c\/p\u003e \u003cp\u003ePrinting Data to the User 832\u003c\/p\u003e \u003cp\u003eReading Input as an I\/O Stream 833\u003c\/p\u003e \u003cp\u003eClosing System Streams 833\u003c\/p\u003e \u003cp\u003eAcquiring Input with Console 834\u003c\/p\u003e \u003cp\u003eWorking with Advanced APIs 837\u003c\/p\u003e \u003cp\u003eManipulating Input Streams 838\u003c\/p\u003e \u003cp\u003eDiscovering File Attributes 840\u003c\/p\u003e \u003cp\u003eTraversing a Directory Tree 843\u003c\/p\u003e \u003cp\u003eSearching a Directory 847\u003c\/p\u003e \u003cp\u003eReview of Key APIs 848\u003c\/p\u003e \u003cp\u003eSummary 850\u003c\/p\u003e \u003cp\u003eExam Essentials 851\u003c\/p\u003e \u003cp\u003eReview Questions 852\u003c\/p\u003e \u003cp\u003e\u003cb\u003eChapter 15 Jdbc 863\u003c\/b\u003e\u003c\/p\u003e \u003cp\u003eIntroducing Relational Databases and SQL 864\u003c\/p\u003e \u003cp\u003eIdentifying the Structure of a Relational Database 866\u003c\/p\u003e \u003cp\u003eWriting Basic SQL Statements 867\u003c\/p\u003e \u003cp\u003eIntroducing the Interfaces of JDBC 868\u003c\/p\u003e \u003cp\u003eConnecting to a Database 870\u003c\/p\u003e \u003cp\u003eBuilding a JDBC URL 870\u003c\/p\u003e \u003cp\u003eGetting a Database Connection 871\u003c\/p\u003e \u003cp\u003eWorking with a PreparedStatement 873\u003c\/p\u003e \u003cp\u003eObtaining a PreparedStatement 874\u003c\/p\u003e \u003cp\u003eExecuting a PreparedStatement 875\u003c\/p\u003e \u003cp\u003eWorking with Parameters 878\u003c\/p\u003e \u003cp\u003eUpdating Multiple Records 881\u003c\/p\u003e \u003cp\u003eGetting Data from a ResultSet 882\u003c\/p\u003e \u003cp\u003eReading a ResultSet 882\u003c\/p\u003e \u003cp\u003eGetting Data for a Column 885\u003c\/p\u003e \u003cp\u003eUsing Bind Variables 887\u003c\/p\u003e \u003cp\u003eCalling a CallableStatement 887\u003c\/p\u003e \u003cp\u003eCalling a Procedure without Parameters 888\u003c\/p\u003e \u003cp\u003ePassing an IN Parameter 889\u003c\/p\u003e \u003cp\u003eReturning an OUT Parameter 889\u003c\/p\u003e \u003cp\u003eWorking with an INOUT Parameter 890\u003c\/p\u003e \u003cp\u003eComparing Callable Statement Parameters 891\u003c\/p\u003e \u003cp\u003eUsing Additional Options 891\u003c\/p\u003e \u003cp\u003eControlling Data with Transactions 892\u003c\/p\u003e \u003cp\u003eCommitting and Rolling Back 892\u003c\/p\u003e \u003cp\u003eBookmarking with Savepoints 894\u003c\/p\u003e \u003cp\u003eReviewing Transaction APIs 895\u003c\/p\u003e \u003cp\u003eClosing Database Resources 895\u003c\/p\u003e \u003cp\u003eSummary 897\u003c\/p\u003e \u003cp\u003eExam Essentials 898\u003c\/p\u003e \u003cp\u003eReview Questions 900\u003c\/p\u003e \u003cp\u003eAppendix Answers to the Review Questions 909\u003c\/p\u003e \u003cp\u003eChapter 1: Building Blocks 910\u003c\/p\u003e \u003cp\u003eChapter 2: Operators 913\u003c\/p\u003e \u003cp\u003eChapter 3: Making Decisions 916\u003c\/p\u003e \u003cp\u003eChapter 4: Core APIs 921\u003c\/p\u003e \u003cp\u003eChapter 5: Methods 924\u003c\/p\u003e \u003cp\u003eChapter 6: Class Design 927\u003c\/p\u003e \u003cp\u003eChapter 7: Beyond Classes 932\u003c\/p\u003e \u003cp\u003eChapter 8: Lambdas and Functional Interfaces 936\u003c\/p\u003e \u003cp\u003eChapter 9: Collections and Generics 939\u003c\/p\u003e \u003cp\u003eChapter 10: Streams 942\u003c\/p\u003e \u003cp\u003eChapter 11: Exceptions and Localization 945\u003c\/p\u003e \u003cp\u003eChapter 12: Modules 949\u003c\/p\u003e \u003cp\u003eChapter 13: Concurrency 951\u003c\/p\u003e \u003cp\u003eChapter 14: I\/o 955\u003c\/p\u003e \u003cp\u003eChapter 15: Jdbc 959\u003cbr\u003e Index 963\u003c\/p\u003e","brand":"John Wiley \u0026 Sons Inc","offers":[{"title":"Default Title","offer_id":48866421244247,"sku":"9781119864585","price":40.0,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0817\/1739\/5799\/files\/9781119864585.jpg?v=1722278565","url":"https:\/\/bookcurl.com\/products\/ocp-oracle-certified-professional-java-se-17-developer-study-guide-9781119864585","provider":"Book Curl","version":"1.0","type":"link"}