Scott Selikoff, Jeanne Boyarsky
Ocp Oracle Certified Professional Java Se 11 Programmer II Study Guide: Exam 1z0-816 and Exam 1z0-817
Ein Angebot für € 9,99 €
Scott Selikoff, Jeanne Boyarsky
Ocp Oracle Certified Professional Java Se 11 Programmer II Study Guide: Exam 1z0-816 and Exam 1z0-817
- Broschiertes Buch
- Merkliste
- Auf die Merkliste
- Bewerten Bewerten
- Teilen
- Produkt teilen
- Produkterinnerung
- Produkterinnerung
This OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and the Programmer II Study Guide: Exam 1Z0-816 were published before Oracle announced major changes to its OCP certification program and the release of the new Developer 1Z0-819 exam.No matter the changes, rest assured both of the Programmer I and II Study Guides cover everything you need to prepare for and take Exam 1Z0-819. If you've purchased one of the Programmer Study Guides, purchase the other one and you'll be all set.NOTE: The OCP Java SE 11 Programmer I Exam 1Z0-815 and Programmer II Exam 1Z0-816…mehr
Andere Kunden interessierten sich auch für
- Scott SelikoffOCP Oracle Certified Professional Java SE 17 Developer Study Guide51,01 €
- Jeanne BoyarskyOCA48,99 €
- Khalid MughalOCP Oracle Certified Professional Java SE 17 Developer (Exam 1Z0-829) Programmer's Guide61,99 €
- Bert BatesOCP Java SE 6 Programmer Practice Exams (Exam 310-065)41,99 €
- Jon DuckettFront-End Back-End Development with HTML, CSS, JavaScript, jQuery, PHP, and MySQL72,99 €
- Jack Li GuojieProfessional Java Native Interfaces with SWT/JFace51,99 €
- Nicholas S. WilliamsProfessional Java for Web Appl65,99 €
-
-
-
This OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 and the Programmer II Study Guide: Exam 1Z0-816 were published before Oracle announced major changes to its OCP certification program and the release of the new Developer 1Z0-819 exam.No matter the changes, rest assured both of the Programmer I and II Study Guides cover everything you need to prepare for and take Exam 1Z0-819. If you've purchased one of the Programmer Study Guides, purchase the other one and you'll be all set.NOTE: The OCP Java SE 11 Programmer I Exam 1Z0-815 and Programmer II Exam 1Z0-816 have been retired (as of October 1, 2020), and Oracle has released a new Developer Exam 1Z0-819 to replace the previous exams. The Upgrade Exam 1Z0-817 remains the same.The completely-updated preparation guide for the new OCP Oracle Certified Professional Java SE 11 Programmer II exam--covers Exam 1Z0-816Java, a platform-independent, object-oriented programming language, is used primarily in mobile and desktop application development. It is a popular language for client-side cloud applications and the principal language used to develop Android applications. Oracle has recently updated its Java Programmer certification tracks for Oracle Certified Professional.OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide ensures that you are fully prepared for this difficult certification exam. Covering 100% of exam objectives, this in-depth study guide provides comprehensive coverage of the functional-programming knowledge necessary to succeed. Every exam topic is thoroughly and completely covered including exceptions and assertions, class design, generics and collections, threads, concurrency, IO and NIO, and more. Access to Sybex's superior online interactive learning environment and test bank--including self-assessment tests, chapter tests, bonus practice exam questions, electronic flashcards, and a searchable glossary of important terms--provides everything you need to be fully prepared on exam day. This must-have guide:_ Covers all exam objectives such as inheriting abstract classes and interfaces, advanced strings and localization, JDBC, and Object-Oriented design principles and patterns_ Explains complex material and reinforces your comprehension and retention of important topics_ Helps you master more advanced areas of functional programming_ Demonstrates practical methods for building Java solutionsOCP Oracle Certified Professional Java SE 11 Programmer II Study Guide will prove invaluable for anyone seeking achievement of this challenging exam, as well as junior- to senior-level programmers who uses Java as their primary programming language.
Produktdetails
- Produktdetails
- Verlag: Sybex / Wiley & Sons
- Artikelnr. des Verlages: 1W119617620
- Seitenzahl: 768
- Erscheinungstermin: 21. Juli 2020
- Englisch
- Abmessung: 233mm x 186mm x 45mm
- Gewicht: 1368g
- ISBN-13: 9781119617624
- ISBN-10: 1119617626
- Artikelnr.: 58023408
- Herstellerkennzeichnung
- Libri GmbH
- Europaallee 1
- 36244 Bad Hersfeld
- 06621 890
- Verlag: Sybex / Wiley & Sons
- Artikelnr. des Verlages: 1W119617620
- Seitenzahl: 768
- Erscheinungstermin: 21. Juli 2020
- Englisch
- Abmessung: 233mm x 186mm x 45mm
- Gewicht: 1368g
- ISBN-13: 9781119617624
- ISBN-10: 1119617626
- Artikelnr.: 58023408
- Herstellerkennzeichnung
- Libri GmbH
- Europaallee 1
- 36244 Bad Hersfeld
- 06621 890
Scott Selikoff, OCA/OCP 8 and OCP 11, has been a professional Java Enterprise architect for over 20 years. He is the founder of Selikoff Solutions, LLC, specializing in building custom mobile and server solutions for businesses in the tri-state New York City area. Jeanne Boyarsky, OCA/OCP 8 and OCP 11, is a Java Champion and has worked as a Java developer for a major bank for more than 18 years. She is a senior moderator at CodeRanch, and trains and mentors students of all levels, including the programming division of a FIRST robotics team.
Introduction xxiAssessment Test xlivChapter 1 Java Fundamentals 1Applying the final Modifier 2Declaring final Local Variables 3Adding final to Instance and static Variables 4Writing final Methods 5Marking Classes final 5Working with Enums 6Creating Simple Enums 6Using Enums in Switch Statements 8Adding Constructors, Fields, and Methods 9Creating Nested Classes 12Declaring an Inner Class 12Creating a static Nested Class 15Writing a Local Class 17Defining an Anonymous Class 18Reviewing Nested Classes 21Understanding Interface Members 22Relying on a default Interface Method 23Using static Interface Methods 27Introducing private Interface Methods 28Introducing private static Interface Methods 29Reviewing Interface Members 31Introducing Functional Programming 32Defining a Functional Interface 32Declaring a Functional Interface with Object Methods 34Implementing Functional Interfaces with Lambdas 36Writing Lambda Expressions 38Working with Lambda Variables 40Summary 43Exam Essentials 44Review Questions 46Chapter 2 Annotations 59Introducing Annotations 60Understanding Metadata 60Purpose of Annotations 61Creating Custom Annotations 64Creating an Annotation 64Specifying a Required Element 65Providing an Optional Element 66Selecting an Element Type 67Applying Element Modifiers 67Adding a Constant Variable 68Reviewing Annotation Rules 68Applying Annotations 69Using Annotations in Declarations 69Mixing Required and Optional Elements 71Creating a value() Element 71Passing an Array of Values 73Declaring Annotation-Specific Annotations 74Limiting Usage with @Target 74Storing Annotations with @Retention 77Generating Javadoc with @Documented 77Inheriting Annotations with @Inherited 79Supporting Duplicates with @Repeatable 79Reviewing Annotation-Specific Annotations 81Using Common Annotations 83Marking Methods with @Override 83Declaring Interfaces with @FunctionalInterface 84Retiring Code with @Deprecated 85Ignoring Warnings with @SuppressWarnings 86Protecting Arguments with @SafeVarargs 88Reviewing Common Annotations 89Summary 91Exam Essentials 92Review Questions 94Chapter 3 Generics and Collections 105Using Method References 107Calling Static Methods 108Calling Instance Methods on a Particular Object 109Calling Instance Methods on a Parameter 109Calling Constructors 110Reviewing Method References 110Using Wrapper Classes 111Using the Diamond Operator 113Using Lists, Sets, Maps, and Queues 114Common Collections Methods 115Using the List Interface 119Using the Set Interface 124Using the Queue Interface 126Using the Map Interface 128Comparing Collection Types 135Sorting Data 137Creating a Comparable Class 137Comparing Data with a Comparator 141Comparing Comparable and Comparator 142Comparing Multiple Fields 143Sorting and Searching 145Working with Generics 147Generic Classes 148Generic Interfaces 151Raw Types 152Generic Methods 153Bounding Generic Types 154Putting It All Together 159Summary 161Exam Essentials 163Review Questions 164Chapter 4 Functional Programming 175Working with Built-in Functional Interfaces 176Implementing Supplier 178Implementing Consumer and BiConsumer 179Implementing Predicate and BiPredicate 180Implementing Function and BiFunction 181Implementing UnaryOperator and BinaryOperator 183Checking Functional Interfaces 184Convenience Methods on Functional Interfaces 185Returning an Optional 187Creating an Optional 188Dealing with an Empty Optional 189Using Streams 191Understanding the Pipeline Flow 191Creating Stream Sources 194Using Common Terminal Operations 197Using Common Intermediate Operations 204Putting Together the Pipeline 209Working with Primitive Streams 213Creating Primitive Streams 214Mapping Streams 217Using Optional l with Primitive Streams 219Summarizing Statistics 220Learning the Functional Interfaces for Primitives 221Working with Advanced Stream Pipeline Concepts 224Linking Streams to the Underlying Data 224Chaining Optionals 224Collecting Results 227Summary 234Exam Essentials 236Review Questions 238Chapter 5 Exceptions, Assertions, and Localization 247Reviewing Exceptions 248Handling Exceptions 248Distinguishing between throw and throws 250Examining Exception Categories 250Inheriting Exception Classes 252Creating Custom Exceptions 253Declaring Exception Classes 253Adding Custom Constructors 253Printing Stack Traces 255Automating Resource Management 256Constructing Try-With-Resources Statements 256Learning the New Effectively Final Feature 259Understanding Suppressed Exceptions 261Declaring Assertions 264Validating Data with the assert Statement 264Enabling Assertions 266Disabling Assertions 267Applying Assertions 267Writing Assertions Correctly 268Working with Dates and Times 268Creating Dates and Times 269Formatting Dates and Times 271Supporting Internationalization and Localization 276Picking a Locale 276Localizing Numbers 279Localizing Dates 283Specifying a Locale Category 284Loading Properties with Resource Bundles 285Creating a Resource Bundle 286Picking a Resource Bundle 288Selecting Resource Bundle Values 289Formatting Messages 291Using the Properties Class 292Summary 293Exam Essentials 294Review Questions 295Chapter 6 Modular Applications 309Reviewing Module Directives 310Comparing Types of Modules 311Named Modules 311Automatic Modules 312Unnamed Modules 315Comparing Module Types 315Analyzing JDK Dependencies 316Identifying Built-in Modules 316Using jdeps 318Migrating an Application 321Determining the Order 321Exploring a Bottom-Up Migration Strategy 322Exploring a Top-Down Migration Strategy 324Splitting a Big Project into Modules 325Failing to Compile with a Cyclic Dependency 326Creating a Service 328Declaring the Service Provider Interface 329Creating a Service Locator 330Invoking from a Consumer 332Adding a Service Provider 333Merging Service Locator and Consumer 334Reviewing Services 337Summary 337Exam Essentials 338Review Questions 339Chapter 7 Concurrency 345Introducing Threads 347Distinguishing Thread Types 348Understanding Thread Concurrency 348Defining a Task with Runnable 349Creating a Thread 351Polling with Sleep 353Creating Threads with the Concurrency API 355Introducing the Single-Thread Executor 355Shutting Down a Thread Executor 356Submitting Tasks 357Waiting for Results 358Submitting Task Collections 362Scheduling Tasks 363Increasing Concurrency with Pools 366Writing Thread-Safe Code 367Understanding Thread-Safety 367Protecting Data with Atomic Classes 369Improving Access with Synchronized Blocks 371Synchronizing on Methods 373Understanding the Lock Framework 375Orchestrating Tasks with a CyclicBarrier 379Using Concurrent Collections 382Understanding Memory Consistency Errors 383Working with Concurrent Classes 383Obtaining Synchronized Collections 388Identifying Threading Problems 389Understanding Liveness 390Managing Race Conditions 393Working with Parallel Streams 394Creating Parallel Streams 395Performing a Parallel Decomposition 396Processing Parallel Reductions 398Avoiding Stateful Operations 403Summary 404Exam Essentials 405Review Questions 406Chapter 8 I/O 419Understanding Files and Directories 420Conceptualizing the File System 420Storing Data as Bytes 422Introducing the File Class 422Introducing I/O Streams 426Understanding I/O Stream Fundamentals 426Learning I/O Stream Nomenclature 427Common I/O Stream Operations 433Reading and Writing Data 433Closing the Stream 435Manipulating Input Streams 436Flushing Output Streams 438Reviewing Common I/O Stream Methods 439Working with I/O Stream Classes 440Reading and Writing Binary Data 440Buffering Binary Data 441Reading and Writing Character Data 443Buffering Character Data 444Serializing Data 445Printing Data 452Review of Stream Classes 457Interacting with Users 458Printing Data to the User 459Reading Input as a Stream 460Closing System Streams 460Acquiring Input with Console 461Summary 464Exam Essentials 464Review Questions 466Chapter 9 NIO.2 475Introducing NIO.2 476Introducing Path 477Creating Paths 478Understanding Common NIO.2 Features 483Interacting with Paths 486Viewing the Path with toString(), getNameCount(), and getName() 486Creating a New Path with subpath() 487Accessing Path Elements with getFileName(), getParent(), and getRoot() 488Checking Path Type with isAbsolute() and toAbsolutePath() 490Joining Paths with resolve() 491Deriving a Path with relativize() 491Cleaning Up a Path with normalize() 493Retrieving the File System Path with toRealPath() 493Reviewing Path Methods 494Operating on Files and Directories 495Checking for Existence with exists() 495Testing Uniqueness with isSameFile() 496Making Directories with createDirectory() and createDirectories() 497Copying Files with copy() 498Moving or Renaming Paths with move() 500Deleting a File with delete() and deleteIfExists() 500Reading and Writing Data with newBufferedReader() and newBufferedWriter() 501Reading a File with readAllLines() 502Reviewing Files Methods 502Managing File Attributes 503Discovering File Attributes 503Improving Attribute Access 506Applying Functional Programming 508Listing Directory Contents 508Traversing a Directory Tree 510Searching a Directory with find() 514Reading a File with lines() 515Comparing Legacy java.io.File and NIO.2 Methods 517Summary 518Exam Essentials 518Review Questions 520Chapter 10 JDBC 529Introducing Relational Databases and SQL 530Identifying the Structure of a Relational Database 532Writing Basic SQL Statements 533Introducing the Interfaces of JDBC 535Connecting to a Database 537Building a JDBC URL 537Getting a Database Connection 539Working with a PreparedStatement 542Obtaining a PreparedStatement 543Executing a PreparedStatement 543Working with Parameters 546Updating Multiple Times 549Getting Data from a ResultSet 551Reading a ResultSet 551Getting Data for a Column 555Using Bind Variables 556Calling a CallableStatement 557Calling a Procedure without Parameters 558Passing an IN Parameter 559Returning an OUT Parameter 559Working with an INOUT Parameter 560Comparing Callable Statement Parameters 560Closing Database Resources 561Summary 564Exam Essentials 564Review Questions 566Chapter 11 Security 575Designing a Secure Object 576Limiting Accessibility 576Restricting Extensibility 577Creating Immutable Objects 578Cloning Objects 581Introducing Injection and Input Validation 583Preventing Injection with a PreparedStatement 583Invalidating Invalid Input with Validation 586Working with Confidential Information 588Guarding Sensitive Data from Output 589Protecting Data in Memory 589Limiting File Access 590Serializing and Deserializing Objects 591Specifying Which Fields to Serialize 591Customizing the Serialization Process 592Pre/Post-Serialization Processing 593Reviewing Serialization Methods 596Constructing Sensitive Objects 597Making Methods final 598Making Classes final 598Making the Constructor private 599Preventing Denial of Service Attacks 600Leaking Resources 600Reading Very Large Resources 600Including Potentially Large Resources 601Overflowing Numbers 601Wasting Data Structures 602Summary 603Exam Essentials 604Review Questions 605Appendices 611Appendix A The Upgrade Exam 611Working with Local Variable Type Inference 612Type Inference of var 613Examples with var 614Review of var Rules 617Introducing Modules 617Exploring a Module 618Benefits of Modules 619Creating and Running a Modular Program 621Creating the Files 622Compiling Our First Module 623Running Our First Module 625Packaging Our First Module 627Updating Our Example for Multiple Modules 628Updating the Feeding Module 628Creating a Care Module 629Creating the Talks Module 631Creating the Staff Module 634Diving into the module-info File 635exports 635requires transitive 636provides, uses, and opens 639Discovering Modules 639The java Command 639The jar Command 643The jdeps Command 643The jmod Command 645Reviewing Command-Line Options 645Summary 648Exam Essentials 649Review Questions 650Appendix B Answers to Review Questions 657Chapter 1: Java Fundamentals 658Chapter 2: Annotations 662Chapter 3: Generics and Collections 665Chapter 4: Functional Programming 669Chapter 5: Exceptions, Assertions, and Localization 672Chapter 6: Modular Applications 676Chapter 7: Concurrency 678Chapter 8: I/O 682Chapter 9: NIO.2 685Chapter 10: JDBC 689Chapter 11: Security 691Appendix A: The Upgrade Exam 693Index 697
Introduction xxiAssessment Test xlivChapter 1 Java Fundamentals 1Applying the final Modifier 2Declaring final Local Variables 3Adding final to Instance and static Variables 4Writing final Methods 5Marking Classes final 5Working with Enums 6Creating Simple Enums 6Using Enums in Switch Statements 8Adding Constructors, Fields, and Methods 9Creating Nested Classes 12Declaring an Inner Class 12Creating a static Nested Class 15Writing a Local Class 17Defining an Anonymous Class 18Reviewing Nested Classes 21Understanding Interface Members 22Relying on a default Interface Method 23Using static Interface Methods 27Introducing private Interface Methods 28Introducing private static Interface Methods 29Reviewing Interface Members 31Introducing Functional Programming 32Defining a Functional Interface 32Declaring a Functional Interface with Object Methods 34Implementing Functional Interfaces with Lambdas 36Writing Lambda Expressions 38Working with Lambda Variables 40Summary 43Exam Essentials 44Review Questions 46Chapter 2 Annotations 59Introducing Annotations 60Understanding Metadata 60Purpose of Annotations 61Creating Custom Annotations 64Creating an Annotation 64Specifying a Required Element 65Providing an Optional Element 66Selecting an Element Type 67Applying Element Modifiers 67Adding a Constant Variable 68Reviewing Annotation Rules 68Applying Annotations 69Using Annotations in Declarations 69Mixing Required and Optional Elements 71Creating a value() Element 71Passing an Array of Values 73Declaring Annotation-Specific Annotations 74Limiting Usage with @Target 74Storing Annotations with @Retention 77Generating Javadoc with @Documented 77Inheriting Annotations with @Inherited 79Supporting Duplicates with @Repeatable 79Reviewing Annotation-Specific Annotations 81Using Common Annotations 83Marking Methods with @Override 83Declaring Interfaces with @FunctionalInterface 84Retiring Code with @Deprecated 85Ignoring Warnings with @SuppressWarnings 86Protecting Arguments with @SafeVarargs 88Reviewing Common Annotations 89Summary 91Exam Essentials 92Review Questions 94Chapter 3 Generics and Collections 105Using Method References 107Calling Static Methods 108Calling Instance Methods on a Particular Object 109Calling Instance Methods on a Parameter 109Calling Constructors 110Reviewing Method References 110Using Wrapper Classes 111Using the Diamond Operator 113Using Lists, Sets, Maps, and Queues 114Common Collections Methods 115Using the List Interface 119Using the Set Interface 124Using the Queue Interface 126Using the Map Interface 128Comparing Collection Types 135Sorting Data 137Creating a Comparable Class 137Comparing Data with a Comparator 141Comparing Comparable and Comparator 142Comparing Multiple Fields 143Sorting and Searching 145Working with Generics 147Generic Classes 148Generic Interfaces 151Raw Types 152Generic Methods 153Bounding Generic Types 154Putting It All Together 159Summary 161Exam Essentials 163Review Questions 164Chapter 4 Functional Programming 175Working with Built-in Functional Interfaces 176Implementing Supplier 178Implementing Consumer and BiConsumer 179Implementing Predicate and BiPredicate 180Implementing Function and BiFunction 181Implementing UnaryOperator and BinaryOperator 183Checking Functional Interfaces 184Convenience Methods on Functional Interfaces 185Returning an Optional 187Creating an Optional 188Dealing with an Empty Optional 189Using Streams 191Understanding the Pipeline Flow 191Creating Stream Sources 194Using Common Terminal Operations 197Using Common Intermediate Operations 204Putting Together the Pipeline 209Working with Primitive Streams 213Creating Primitive Streams 214Mapping Streams 217Using Optional l with Primitive Streams 219Summarizing Statistics 220Learning the Functional Interfaces for Primitives 221Working with Advanced Stream Pipeline Concepts 224Linking Streams to the Underlying Data 224Chaining Optionals 224Collecting Results 227Summary 234Exam Essentials 236Review Questions 238Chapter 5 Exceptions, Assertions, and Localization 247Reviewing Exceptions 248Handling Exceptions 248Distinguishing between throw and throws 250Examining Exception Categories 250Inheriting Exception Classes 252Creating Custom Exceptions 253Declaring Exception Classes 253Adding Custom Constructors 253Printing Stack Traces 255Automating Resource Management 256Constructing Try-With-Resources Statements 256Learning the New Effectively Final Feature 259Understanding Suppressed Exceptions 261Declaring Assertions 264Validating Data with the assert Statement 264Enabling Assertions 266Disabling Assertions 267Applying Assertions 267Writing Assertions Correctly 268Working with Dates and Times 268Creating Dates and Times 269Formatting Dates and Times 271Supporting Internationalization and Localization 276Picking a Locale 276Localizing Numbers 279Localizing Dates 283Specifying a Locale Category 284Loading Properties with Resource Bundles 285Creating a Resource Bundle 286Picking a Resource Bundle 288Selecting Resource Bundle Values 289Formatting Messages 291Using the Properties Class 292Summary 293Exam Essentials 294Review Questions 295Chapter 6 Modular Applications 309Reviewing Module Directives 310Comparing Types of Modules 311Named Modules 311Automatic Modules 312Unnamed Modules 315Comparing Module Types 315Analyzing JDK Dependencies 316Identifying Built-in Modules 316Using jdeps 318Migrating an Application 321Determining the Order 321Exploring a Bottom-Up Migration Strategy 322Exploring a Top-Down Migration Strategy 324Splitting a Big Project into Modules 325Failing to Compile with a Cyclic Dependency 326Creating a Service 328Declaring the Service Provider Interface 329Creating a Service Locator 330Invoking from a Consumer 332Adding a Service Provider 333Merging Service Locator and Consumer 334Reviewing Services 337Summary 337Exam Essentials 338Review Questions 339Chapter 7 Concurrency 345Introducing Threads 347Distinguishing Thread Types 348Understanding Thread Concurrency 348Defining a Task with Runnable 349Creating a Thread 351Polling with Sleep 353Creating Threads with the Concurrency API 355Introducing the Single-Thread Executor 355Shutting Down a Thread Executor 356Submitting Tasks 357Waiting for Results 358Submitting Task Collections 362Scheduling Tasks 363Increasing Concurrency with Pools 366Writing Thread-Safe Code 367Understanding Thread-Safety 367Protecting Data with Atomic Classes 369Improving Access with Synchronized Blocks 371Synchronizing on Methods 373Understanding the Lock Framework 375Orchestrating Tasks with a CyclicBarrier 379Using Concurrent Collections 382Understanding Memory Consistency Errors 383Working with Concurrent Classes 383Obtaining Synchronized Collections 388Identifying Threading Problems 389Understanding Liveness 390Managing Race Conditions 393Working with Parallel Streams 394Creating Parallel Streams 395Performing a Parallel Decomposition 396Processing Parallel Reductions 398Avoiding Stateful Operations 403Summary 404Exam Essentials 405Review Questions 406Chapter 8 I/O 419Understanding Files and Directories 420Conceptualizing the File System 420Storing Data as Bytes 422Introducing the File Class 422Introducing I/O Streams 426Understanding I/O Stream Fundamentals 426Learning I/O Stream Nomenclature 427Common I/O Stream Operations 433Reading and Writing Data 433Closing the Stream 435Manipulating Input Streams 436Flushing Output Streams 438Reviewing Common I/O Stream Methods 439Working with I/O Stream Classes 440Reading and Writing Binary Data 440Buffering Binary Data 441Reading and Writing Character Data 443Buffering Character Data 444Serializing Data 445Printing Data 452Review of Stream Classes 457Interacting with Users 458Printing Data to the User 459Reading Input as a Stream 460Closing System Streams 460Acquiring Input with Console 461Summary 464Exam Essentials 464Review Questions 466Chapter 9 NIO.2 475Introducing NIO.2 476Introducing Path 477Creating Paths 478Understanding Common NIO.2 Features 483Interacting with Paths 486Viewing the Path with toString(), getNameCount(), and getName() 486Creating a New Path with subpath() 487Accessing Path Elements with getFileName(), getParent(), and getRoot() 488Checking Path Type with isAbsolute() and toAbsolutePath() 490Joining Paths with resolve() 491Deriving a Path with relativize() 491Cleaning Up a Path with normalize() 493Retrieving the File System Path with toRealPath() 493Reviewing Path Methods 494Operating on Files and Directories 495Checking for Existence with exists() 495Testing Uniqueness with isSameFile() 496Making Directories with createDirectory() and createDirectories() 497Copying Files with copy() 498Moving or Renaming Paths with move() 500Deleting a File with delete() and deleteIfExists() 500Reading and Writing Data with newBufferedReader() and newBufferedWriter() 501Reading a File with readAllLines() 502Reviewing Files Methods 502Managing File Attributes 503Discovering File Attributes 503Improving Attribute Access 506Applying Functional Programming 508Listing Directory Contents 508Traversing a Directory Tree 510Searching a Directory with find() 514Reading a File with lines() 515Comparing Legacy java.io.File and NIO.2 Methods 517Summary 518Exam Essentials 518Review Questions 520Chapter 10 JDBC 529Introducing Relational Databases and SQL 530Identifying the Structure of a Relational Database 532Writing Basic SQL Statements 533Introducing the Interfaces of JDBC 535Connecting to a Database 537Building a JDBC URL 537Getting a Database Connection 539Working with a PreparedStatement 542Obtaining a PreparedStatement 543Executing a PreparedStatement 543Working with Parameters 546Updating Multiple Times 549Getting Data from a ResultSet 551Reading a ResultSet 551Getting Data for a Column 555Using Bind Variables 556Calling a CallableStatement 557Calling a Procedure without Parameters 558Passing an IN Parameter 559Returning an OUT Parameter 559Working with an INOUT Parameter 560Comparing Callable Statement Parameters 560Closing Database Resources 561Summary 564Exam Essentials 564Review Questions 566Chapter 11 Security 575Designing a Secure Object 576Limiting Accessibility 576Restricting Extensibility 577Creating Immutable Objects 578Cloning Objects 581Introducing Injection and Input Validation 583Preventing Injection with a PreparedStatement 583Invalidating Invalid Input with Validation 586Working with Confidential Information 588Guarding Sensitive Data from Output 589Protecting Data in Memory 589Limiting File Access 590Serializing and Deserializing Objects 591Specifying Which Fields to Serialize 591Customizing the Serialization Process 592Pre/Post-Serialization Processing 593Reviewing Serialization Methods 596Constructing Sensitive Objects 597Making Methods final 598Making Classes final 598Making the Constructor private 599Preventing Denial of Service Attacks 600Leaking Resources 600Reading Very Large Resources 600Including Potentially Large Resources 601Overflowing Numbers 601Wasting Data Structures 602Summary 603Exam Essentials 604Review Questions 605Appendices 611Appendix A The Upgrade Exam 611Working with Local Variable Type Inference 612Type Inference of var 613Examples with var 614Review of var Rules 617Introducing Modules 617Exploring a Module 618Benefits of Modules 619Creating and Running a Modular Program 621Creating the Files 622Compiling Our First Module 623Running Our First Module 625Packaging Our First Module 627Updating Our Example for Multiple Modules 628Updating the Feeding Module 628Creating a Care Module 629Creating the Talks Module 631Creating the Staff Module 634Diving into the module-info File 635exports 635requires transitive 636provides, uses, and opens 639Discovering Modules 639The java Command 639The jar Command 643The jdeps Command 643The jmod Command 645Reviewing Command-Line Options 645Summary 648Exam Essentials 649Review Questions 650Appendix B Answers to Review Questions 657Chapter 1: Java Fundamentals 658Chapter 2: Annotations 662Chapter 3: Generics and Collections 665Chapter 4: Functional Programming 669Chapter 5: Exceptions, Assertions, and Localization 672Chapter 6: Modular Applications 676Chapter 7: Concurrency 678Chapter 8: I/O 682Chapter 9: NIO.2 685Chapter 10: JDBC 689Chapter 11: Security 691Appendix A: The Upgrade Exam 693Index 697