Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020)
Learn faster with Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020), featuring key study points for certification.
Sarah Anderson
Contributor
4.4
92
about 2 months ago
Preview (31 of 996)
Sign in to access the full document!
Table of Contents
Cover
Acknowledgments
About the Authors
Introduction
Understanding the Exam
Reading This Book
Preparing for the Exam
Taking the Exam
Objective Map
Taking the Assessment Test
Chapter 1: Java Fundamentals
Applying the final Modifier
Working with Enums
Creating Nested Classes
Understanding Interface Members
Introducing Functional Programming
Summary
Exam Essentials
Review Questions
Chapter 2: Annotations
Introducing Annotations
Creating Custom Annotations
Applying Annotations
Declaring Annotation-Specific Annotations
Using Common Annotations
Summary
Exam Essentials
Cover
Acknowledgments
About the Authors
Introduction
Understanding the Exam
Reading This Book
Preparing for the Exam
Taking the Exam
Objective Map
Taking the Assessment Test
Chapter 1: Java Fundamentals
Applying the final Modifier
Working with Enums
Creating Nested Classes
Understanding Interface Members
Introducing Functional Programming
Summary
Exam Essentials
Review Questions
Chapter 2: Annotations
Introducing Annotations
Creating Custom Annotations
Applying Annotations
Declaring Annotation-Specific Annotations
Using Common Annotations
Summary
Exam Essentials
Review Questions
Chapter 3: Generics and Collections
Using Method References
Using Wrapper Classes
Using the Diamond Operator
Using Lists, Sets, Maps, and Queues
Sorting Data
Working with Generics
Summary
Exam Essentials
Review Questions
Chapter 4: Functional Programming
Working with Built-in Functional Interfaces
Returning an Optional
Using Streams
Working with Primitive Streams
Working with Advanced Stream Pipeline Concepts
Summary
Exam Essentials
Review Questions
Chapter 5: Exceptions, Assertions, and Localization
Reviewing Exceptions
Creating Custom Exceptions
Automating Resource Management
Declaring Assertions
Working with Dates and Times
Supporting Internationalization and Localization
Loading Properties with Resource Bundles
Summary
Chapter 3: Generics and Collections
Using Method References
Using Wrapper Classes
Using the Diamond Operator
Using Lists, Sets, Maps, and Queues
Sorting Data
Working with Generics
Summary
Exam Essentials
Review Questions
Chapter 4: Functional Programming
Working with Built-in Functional Interfaces
Returning an Optional
Using Streams
Working with Primitive Streams
Working with Advanced Stream Pipeline Concepts
Summary
Exam Essentials
Review Questions
Chapter 5: Exceptions, Assertions, and Localization
Reviewing Exceptions
Creating Custom Exceptions
Automating Resource Management
Declaring Assertions
Working with Dates and Times
Supporting Internationalization and Localization
Loading Properties with Resource Bundles
Summary
Loading page 4...
Exam Essentials
Review Questions
Chapter 6: Modular Applications
Reviewing Module Directives
Comparing Types of Modules
Analyzing JDK Dependencies
Migrating an Application
Creating a Service
Summary
Exam Essentials
Review Questions
Chapter 7: Concurrency
Introducing Threads
Creating Threads with the Concurrency API
Writing Thread-Safe Code
Using Concurrent Collections
Identifying Threading Problems
Working with Parallel Streams
Summary
Exam Essentials
Review Questions
Chapter 8: I/O
Understanding Files and Directories
Introducing I/O Streams
Common I/O Stream Operations
Working with I/O Stream Classes
Interacting with Users
Summary
Exam Essentials
Review Questions
Chapter 6: Modular Applications
Reviewing Module Directives
Comparing Types of Modules
Analyzing JDK Dependencies
Migrating an Application
Creating a Service
Summary
Exam Essentials
Review Questions
Chapter 7: Concurrency
Introducing Threads
Creating Threads with the Concurrency API
Writing Thread-Safe Code
Using Concurrent Collections
Identifying Threading Problems
Working with Parallel Streams
Summary
Exam Essentials
Review Questions
Chapter 8: I/O
Understanding Files and Directories
Introducing I/O Streams
Common I/O Stream Operations
Working with I/O Stream Classes
Interacting with Users
Summary
Exam Essentials
Loading page 5...
Review Questions
Chapter 9: NIO.2
Introducing NIO.2
Interacting with Paths
Operating on Files and Directories
Managing File Attributes
Applying Functional Programming
Comparing Legacy java.io.File and NIO.2 Methods
Summary
Exam Essentials
Review Questions
Chapter 10: JDBC
Introducing Relational Databases and SQL
Introducing the Interfaces of JDBC
Connecting to a Database
Working with a PreparedStatement
Getting Data from a ResultSet
Calling a CallableStatement
Closing Database Resources
Summary
Exam Essentials
Review Questions
Chapter 11: Security
Designing a Secure Object
Introducing Injection and Input Validation
Working with Confidential Information
Serializing and Deserializing Objects
Constructing Sensitive Objects
Preventing Denial of Service Attacks
Chapter 9: NIO.2
Introducing NIO.2
Interacting with Paths
Operating on Files and Directories
Managing File Attributes
Applying Functional Programming
Comparing Legacy java.io.File and NIO.2 Methods
Summary
Exam Essentials
Review Questions
Chapter 10: JDBC
Introducing Relational Databases and SQL
Introducing the Interfaces of JDBC
Connecting to a Database
Working with a PreparedStatement
Getting Data from a ResultSet
Calling a CallableStatement
Closing Database Resources
Summary
Exam Essentials
Review Questions
Chapter 11: Security
Designing a Secure Object
Introducing Injection and Input Validation
Working with Confidential Information
Serializing and Deserializing Objects
Constructing Sensitive Objects
Preventing Denial of Service Attacks
Loading page 6...
Summary
Exam Essentials
Review Questions
Appendix A: The Upgrade Exam
Working with Local Variable Type Inference
Introducing Modules
Creating and Running a Modular Program
Updating Our Example for Multiple Modules
Diving into the module-info File
Discovering Modules
Reviewing Command-Line Options
Summary
Exam Essentials
Review Questions
Appendix B: Answers to Review Questions
Chapter 1: Java Fundamentals
Chapter 2: Annotations
Chapter 3: Generics and Collections
Chapter 4: Functional Programming
Chapter 5: Exceptions, Assertions, and Localization
Chapter 6: Modular Applications
Chapter 7: Concurrency
Chapter 8: I/O
Chapter 9: NIO.2
Chapter 10: JDBC
Chapter 11: Security
Appendix A: The Upgrade Exam
Index
Online Test Bank
Exam Essentials
Review Questions
Appendix A: The Upgrade Exam
Working with Local Variable Type Inference
Introducing Modules
Creating and Running a Modular Program
Updating Our Example for Multiple Modules
Diving into the module-info File
Discovering Modules
Reviewing Command-Line Options
Summary
Exam Essentials
Review Questions
Appendix B: Answers to Review Questions
Chapter 1: Java Fundamentals
Chapter 2: Annotations
Chapter 3: Generics and Collections
Chapter 4: Functional Programming
Chapter 5: Exceptions, Assertions, and Localization
Chapter 6: Modular Applications
Chapter 7: Concurrency
Chapter 8: I/O
Chapter 9: NIO.2
Chapter 10: JDBC
Chapter 11: Security
Appendix A: The Upgrade Exam
Index
Online Test Bank
Loading page 7...
Register and Access the Online Test Bank
End User License Agreement
List of Tables
Chapter 1
TABLE 1.1 Modifiers in nested classes
TABLE 1.2 Members in nested classes
TABLE 1.3 Nested class access rules
TABLE 1.4 Interface member types
TABLE 1.5 Interface member access
Chapter 2
TABLE 2.1 Values for the @Target annotation
TABLE 2.2 Values for the @Retention annotation
TABLE 2.3 Annotation-specific annotations
TABLE 2.4 Common @SuppressWarnings values
TABLE 2.5 Understanding common annotations
TABLE 2.6 Applying common annotations
Chapter 3
TABLE 3.1 Functional interfaces used in this chapter
TABLE 3.2 Method references
TABLE 3.3 Wrapper classes
TABLE 3.4 Factory methods to create a List
TABLE 3.5 List methods
TABLE 3.6 Queue methods
TABLE 3.7 Map methods
TABLE 3.8 Behavior of the merge() method
End User License Agreement
List of Tables
Chapter 1
TABLE 1.1 Modifiers in nested classes
TABLE 1.2 Members in nested classes
TABLE 1.3 Nested class access rules
TABLE 1.4 Interface member types
TABLE 1.5 Interface member access
Chapter 2
TABLE 2.1 Values for the @Target annotation
TABLE 2.2 Values for the @Retention annotation
TABLE 2.3 Annotation-specific annotations
TABLE 2.4 Common @SuppressWarnings values
TABLE 2.5 Understanding common annotations
TABLE 2.6 Applying common annotations
Chapter 3
TABLE 3.1 Functional interfaces used in this chapter
TABLE 3.2 Method references
TABLE 3.3 Wrapper classes
TABLE 3.4 Factory methods to create a List
TABLE 3.5 List methods
TABLE 3.6 Queue methods
TABLE 3.7 Map methods
TABLE 3.8 Behavior of the merge() method
Loading page 8...
TABLE 3.9 Java Collections Framework types
TABLE 3.10 Collection attributes
TABLE 3.11 Comparison of Comparable and Comparator
TABLE 3.12 Helper static methods for building a Comparator
TABLE 3.13 Helper default methods for building a
Comparator
TABLE 3.14 Types of bounds
TABLE 3.15 Why we need a lower bound
Chapter 4
TABLE 4.1 Common functional interfaces
TABLE 4.2 Convenience methods
TABLE 4.3 Optional instance methods
TABLE 4.4 Intermediate vs. terminal operations
TABLE 4.5 Creating a source
TABLE 4.6 Terminal stream operations
TABLE 4.7 Common primitive stream methods
TABLE 4.8 Mapping methods between types of streams
TABLE 4.9 Function parameters when mapping between
types of streams
TABLE 4.10 Optional types for primitives
TABLE 4.11 Common functional interfaces for primitives
TABLE 4.12 Primitive-specific functional interfaces
TABLE 4.13 Examples of grouping/partitioning collectors
Chapter 5
TABLE 5.1 Unchecked exceptions
TABLE 5.2 Checked exceptions
TABLE 5.3 Assertion applications
TABLE 3.10 Collection attributes
TABLE 3.11 Comparison of Comparable and Comparator
TABLE 3.12 Helper static methods for building a Comparator
TABLE 3.13 Helper default methods for building a
Comparator
TABLE 3.14 Types of bounds
TABLE 3.15 Why we need a lower bound
Chapter 4
TABLE 4.1 Common functional interfaces
TABLE 4.2 Convenience methods
TABLE 4.3 Optional instance methods
TABLE 4.4 Intermediate vs. terminal operations
TABLE 4.5 Creating a source
TABLE 4.6 Terminal stream operations
TABLE 4.7 Common primitive stream methods
TABLE 4.8 Mapping methods between types of streams
TABLE 4.9 Function parameters when mapping between
types of streams
TABLE 4.10 Optional types for primitives
TABLE 4.11 Common functional interfaces for primitives
TABLE 4.12 Primitive-specific functional interfaces
TABLE 4.13 Examples of grouping/partitioning collectors
Chapter 5
TABLE 5.1 Unchecked exceptions
TABLE 5.2 Checked exceptions
TABLE 5.3 Assertion applications
Loading page 9...
TABLE 5.4 Date and time types
TABLE 5.5 Common date/time symbols
TABLE 5.6 Supported date/time symbols
TABLE 5.7 Factory methods to get a NumberFormat
TABLE 5.8 DecimalFormat symbols
TABLE 5.9 Factory methods to get a DateTimeFormatter
TABLE 5.10 Locale.Category values
TABLE 5.11 Picking a resource bundle for French/France
with default locale En...
TABLE 5.12 Selecting resource bundle properties
Chapter 6
TABLE 6.1 Common module directives
TABLE 6.2 Practicing with automatic module names
TABLE 6.3 Properties of modules types
TABLE 6.4 Common modules
TABLE 6.5 Java modules prefixed with java
TABLE 6.6 Java modules prefixed with jdk
TABLE 6.7 Comparing migration strategies
TABLE 6.8 Reviewing services
Chapter 7
TABLE 7.1 ExecutorService methods
TABLE 7.2 Future methods
TABLE 7.3 TimeUnit values
TABLE 7.4 ScheduledExecutorService methods
TABLE 7.5 Executors factory methods
TABLE 7.6 Atomic classes
TABLE 5.5 Common date/time symbols
TABLE 5.6 Supported date/time symbols
TABLE 5.7 Factory methods to get a NumberFormat
TABLE 5.8 DecimalFormat symbols
TABLE 5.9 Factory methods to get a DateTimeFormatter
TABLE 5.10 Locale.Category values
TABLE 5.11 Picking a resource bundle for French/France
with default locale En...
TABLE 5.12 Selecting resource bundle properties
Chapter 6
TABLE 6.1 Common module directives
TABLE 6.2 Practicing with automatic module names
TABLE 6.3 Properties of modules types
TABLE 6.4 Common modules
TABLE 6.5 Java modules prefixed with java
TABLE 6.6 Java modules prefixed with jdk
TABLE 6.7 Comparing migration strategies
TABLE 6.8 Reviewing services
Chapter 7
TABLE 7.1 ExecutorService methods
TABLE 7.2 Future methods
TABLE 7.3 TimeUnit values
TABLE 7.4 ScheduledExecutorService methods
TABLE 7.5 Executors factory methods
TABLE 7.6 Atomic classes
Loading page 10...
TABLE 7.7 Common atomic methods
TABLE 7.8 Lock methods
TABLE 7.9 Concurrent collection classes
TABLE 7.10 BlockingQueue waiting methods
TABLE 7.11 Synchronized collections methods
Chapter 8
TABLE 8.1 Commonly used java.io.File methods
TABLE 8.2 The java.io abstract stream base classes
TABLE 8.3 The java.io concrete stream classes
TABLE 8.4 Common I/O stream methods
TABLE 8.5 Common print stream format() symbols
Chapter 9
TABLE 9.1 File system symbols
TABLE 9.2 Common NIO.2 method arguments
TABLE 9.3 Path methods
TABLE 9.4 Files methods
TABLE 9.5 The attributes and view types
TABLE 9.6 Walking a directory with a cycle using breadth-
first search
TABLE 9.7 Comparison ofjava.io.File and NIO.2 methods
Chapter 10
TABLE 10.1 CRUD operations
TABLE 10.2 SQL runnable by the execute method
TABLE 10.3 Return types of execute methods
TABLE 10.4 PreparedStatement methods
TABLE 10.5 ResultSet get methods
TABLE 7.8 Lock methods
TABLE 7.9 Concurrent collection classes
TABLE 7.10 BlockingQueue waiting methods
TABLE 7.11 Synchronized collections methods
Chapter 8
TABLE 8.1 Commonly used java.io.File methods
TABLE 8.2 The java.io abstract stream base classes
TABLE 8.3 The java.io concrete stream classes
TABLE 8.4 Common I/O stream methods
TABLE 8.5 Common print stream format() symbols
Chapter 9
TABLE 9.1 File system symbols
TABLE 9.2 Common NIO.2 method arguments
TABLE 9.3 Path methods
TABLE 9.4 Files methods
TABLE 9.5 The attributes and view types
TABLE 9.6 Walking a directory with a cycle using breadth-
first search
TABLE 9.7 Comparison ofjava.io.File and NIO.2 methods
Chapter 10
TABLE 10.1 CRUD operations
TABLE 10.2 SQL runnable by the execute method
TABLE 10.3 Return types of execute methods
TABLE 10.4 PreparedStatement methods
TABLE 10.5 ResultSet get methods
Loading page 11...
TABLE 10.6 Sample stored procedures
TABLE 10.7 Stored procedure parameter types
Chapter 11
TABLE 11.1 Types of confidential data
TABLE 11.2 Methods for serialization and deserialization
Appendix A
TABLE A.1 Options you need to know for using modules with
javac
TABLE A.2 Options you need to know for using modules with
java
TABLE A.3 Access control with modules
TABLE A.4 Modes using jmod
TABLE A.5 Comparing command-line operations
TABLE A.6 Options you need to know for the exam: javac
TABLE A.7 Options you need to know for the exam: java
TABLE A.8 Options you need to know for the exam: jar
TABLE A.9 Options you need to know for the exam: jdeps
List of Illustrations
Introduction
FIGURE I.1 Past and current Java certifications
FIGURE I.2 Latest Java certification exams
FIGURE I.3 Exam prerequisites
Chapter 1
FIGURE 1.1 Lambda syntax omitting optional parts
FIGURE 1.2 Lambda syntax, including optional parts
Chapter 2
TABLE 10.7 Stored procedure parameter types
Chapter 11
TABLE 11.1 Types of confidential data
TABLE 11.2 Methods for serialization and deserialization
Appendix A
TABLE A.1 Options you need to know for using modules with
javac
TABLE A.2 Options you need to know for using modules with
java
TABLE A.3 Access control with modules
TABLE A.4 Modes using jmod
TABLE A.5 Comparing command-line operations
TABLE A.6 Options you need to know for the exam: javac
TABLE A.7 Options you need to know for the exam: java
TABLE A.8 Options you need to know for the exam: jar
TABLE A.9 Options you need to know for the exam: jdeps
List of Illustrations
Introduction
FIGURE I.1 Past and current Java certifications
FIGURE I.2 Latest Java certification exams
FIGURE I.3 Exam prerequisites
Chapter 1
FIGURE 1.1 Lambda syntax omitting optional parts
FIGURE 1.2 Lambda syntax, including optional parts
Chapter 2
Loading page 12...
FIGURE 2.1 Annotation declaration
FIGURE 2.2 Using an annotation
Chapter 3
FIGURE 3.1 The Collection interface is the root of all
collections except ma...
FIGURE 3.2 Example of a List
FIGURE 3.3 Example of a Set
FIGURE 3.4 Examples of a HashSet and TreeSet
FIGURE 3.5 Example of a Queue
FIGURE 3.6 Working with a queue
FIGURE 3.7 Example of a Map
Chapter 4
FIGURE 4.1 Optional
FIGURE 4.2 Stream pipeline
FIGURE 4.3 Steps in running a stream pipeline
FIGURE 4.4 A stream pipeline with a limit
FIGURE 4.5 Stream pipeline with multiple intermediate
operations
Chapter 5
FIGURE 5.1 The syntax of a try statement
FIGURE 5.2 The syntax of a try with resources statement
FIGURE 5.3 Categories of exceptions
FIGURE 5.4 The syntax of assert statements
FIGURE 5.5 Locale formats
Chapter 6
FIGURE 6.1 A named module
FIGURE 6.2 An automatic module
FIGURE 2.2 Using an annotation
Chapter 3
FIGURE 3.1 The Collection interface is the root of all
collections except ma...
FIGURE 3.2 Example of a List
FIGURE 3.3 Example of a Set
FIGURE 3.4 Examples of a HashSet and TreeSet
FIGURE 3.5 Example of a Queue
FIGURE 3.6 Working with a queue
FIGURE 3.7 Example of a Map
Chapter 4
FIGURE 4.1 Optional
FIGURE 4.2 Stream pipeline
FIGURE 4.3 Steps in running a stream pipeline
FIGURE 4.4 A stream pipeline with a limit
FIGURE 4.5 Stream pipeline with multiple intermediate
operations
Chapter 5
FIGURE 5.1 The syntax of a try statement
FIGURE 5.2 The syntax of a try with resources statement
FIGURE 5.3 Categories of exceptions
FIGURE 5.4 The syntax of assert statements
FIGURE 5.5 Locale formats
Chapter 6
FIGURE 6.1 A named module
FIGURE 6.2 An automatic module
Loading page 13...
FIGURE 6.3 An unnamed module
FIGURE 6.4 Determining the order
FIGURE 6.5 Determining the order when not unique
FIGURE 6.6 Bottom-up migration
FIGURE 6.7 Top-down migration
FIGURE 6.8 First attempt at decomposition
FIGURE 6.9 Removing the cyclic dependencies
FIGURE 6.10 Modules in the tour application
Chapter 7
FIGURE 7.1 Process model
FIGURE 7.2 ExecutorService life cycle
FIGURE 7.3 Lack of thread synchronization
FIGURE 7.4 Thread synchronization using atomic operations
FIGURE 7.5 Race condition on user creation
Chapter 8
FIGURE 8.1 Directory and file hierarchy
FIGURE 8.2 Visual representation of a stream
FIGURE 8.3 Serialization process
FIGURE 8.4 Diagram of I/O stream classes
Chapter 9
FIGURE 9.1 File system with a symbolic link
FIGURE 9.2 NIO.2 class and interface relationships
FIGURE 9.3 Relative paths using path symbols
FIGURE 9.4 Comparing file uniqueness
FIGURE 9.5 File and directory as a tree structure
FIGURE 9.6 File system with cycle
FIGURE 6.4 Determining the order
FIGURE 6.5 Determining the order when not unique
FIGURE 6.6 Bottom-up migration
FIGURE 6.7 Top-down migration
FIGURE 6.8 First attempt at decomposition
FIGURE 6.9 Removing the cyclic dependencies
FIGURE 6.10 Modules in the tour application
Chapter 7
FIGURE 7.1 Process model
FIGURE 7.2 ExecutorService life cycle
FIGURE 7.3 Lack of thread synchronization
FIGURE 7.4 Thread synchronization using atomic operations
FIGURE 7.5 Race condition on user creation
Chapter 8
FIGURE 8.1 Directory and file hierarchy
FIGURE 8.2 Visual representation of a stream
FIGURE 8.3 Serialization process
FIGURE 8.4 Diagram of I/O stream classes
Chapter 9
FIGURE 9.1 File system with a symbolic link
FIGURE 9.2 NIO.2 class and interface relationships
FIGURE 9.3 Relative paths using path symbols
FIGURE 9.4 Comparing file uniqueness
FIGURE 9.5 File and directory as a tree structure
FIGURE 9.6 File system with cycle
Loading page 14...
Chapter 10
FIGURE 10.1 Tables in our relational database
FIGURE 10.2 Key JDBC interfaces
FIGURE 10.3 The JDBC URL format
FIGURE 10.4 Types of statements
FIGURE 10.5 The ResultSet cursor
Chapter 11
FIGURE 11.1 Cloneable logic
FIGURE 11.2 Hours table
FIGURE 11.3 Directory structure
FIGURE 11.4 Writing and reading an employee
Appendix A
FIGURE A.1 Design of a modular system
FIGURE A.2 Looking inside a module
FIGURE A.3 Contents of zoo.animal.feeding
FIGURE A.4 Module zoo.animal.feeding directory structure
FIGURE A.5 Running a module using java
FIGURE A.6 Module zoo.animal.feeding directory structure
with class and jar ...
FIGURE A.7 Modules depending on zoo.animal.feeding
FIGURE A.8 Contents of zoo.animal.care
FIGURE A.9 Module zoo.animal.care directory structure
FIGURE A.10 Dependencies for zoo.animal.talks
FIGURE A.11 Contents of zoo.animal.talks
FIGURE A.12 Contents of zoo.staff
FIGURE A.13 Dependencies for zoo.staff
FIGURE 10.1 Tables in our relational database
FIGURE 10.2 Key JDBC interfaces
FIGURE 10.3 The JDBC URL format
FIGURE 10.4 Types of statements
FIGURE 10.5 The ResultSet cursor
Chapter 11
FIGURE 11.1 Cloneable logic
FIGURE 11.2 Hours table
FIGURE 11.3 Directory structure
FIGURE 11.4 Writing and reading an employee
Appendix A
FIGURE A.1 Design of a modular system
FIGURE A.2 Looking inside a module
FIGURE A.3 Contents of zoo.animal.feeding
FIGURE A.4 Module zoo.animal.feeding directory structure
FIGURE A.5 Running a module using java
FIGURE A.6 Module zoo.animal.feeding directory structure
with class and jar ...
FIGURE A.7 Modules depending on zoo.animal.feeding
FIGURE A.8 Contents of zoo.animal.care
FIGURE A.9 Module zoo.animal.care directory structure
FIGURE A.10 Dependencies for zoo.animal.talks
FIGURE A.11 Contents of zoo.animal.talks
FIGURE A.12 Contents of zoo.staff
FIGURE A.13 Dependencies for zoo.staff
Loading page 15...
FIGURE A.14 Transitive dependency version of our modules
Loading page 16...
OCP Oracle® Certified
Professional Java® SE 11
Programmer II
Study Guide Exam 1Z0-816 and Exam 1Z0-817
Scott Selikoff
Jeanne Boyarsky
Professional Java® SE 11
Programmer II
Study Guide Exam 1Z0-816 and Exam 1Z0-817
Scott Selikoff
Jeanne Boyarsky
Loading page 17...
Loading page 18...
Copyright © 2020 by John Wiley & Sons, Inc., Indianapolis, Indiana
Published simultaneously in Canada and the United Kingdom.
ISBN: 978-1-119-61762-4
ISBN: 978-1-119-61763-1 (ebk)
ISBN: 978-1-119-61758-7 (ebk)
No part of this publication may be reproduced, stored in a retrieval system or transmitted in
any form or by any means, electronic, mechanical, photocopying, recording, scanning or
otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright
Act, without either the prior written permission of the Publisher, or authorization through
payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood
Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher
for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc.,
111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at
www.wiley.com/go/permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no
representations or warranties with respect to the accuracy or completeness of the contents of
this work and specifically disclaim all warranties, including without limitation warranties of
fitness for a particular purpose. No warranty may be created or extended by sales or
promotional materials. The advice and strategies contained herein may not be suitable for
every situation. This work is sold with the understanding that the publisher is not engaged in
rendering legal, accounting, or other professional services. If professional assistance is
required, the services of a competent professional person should be sought. Neither the
publisher nor the author shall be liable for damages arising herefrom. The fact that an
organization or Web site is referred to in this work as a citation and/or a potential source of
further information does not mean that the author or the publisher endorses the information
the organization or Web site may provide or recommendations it may make. Further, readers
should be aware that Internet Web sites listed in this work may have changed or disappeared
between when this work was written and when it is read.
For general information on our other products and services or to obtain technical support,
please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the
U.S. at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some
material included with standard print versions of this book may not be included in e-books or
in print-on-demand. If this book refers to media such as a CD or DVD that is not included in
the version you purchased, you may download this material at booksupport.wiley.com. For
more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2020938185
TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered
trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other
countries, and may not be used without written permission. Oracle and Java are registered
trademarks of Oracle America, Inc. All other trademarks are the property of their respective
owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in
this book.
Published simultaneously in Canada and the United Kingdom.
ISBN: 978-1-119-61762-4
ISBN: 978-1-119-61763-1 (ebk)
ISBN: 978-1-119-61758-7 (ebk)
No part of this publication may be reproduced, stored in a retrieval system or transmitted in
any form or by any means, electronic, mechanical, photocopying, recording, scanning or
otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright
Act, without either the prior written permission of the Publisher, or authorization through
payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood
Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher
for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc.,
111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at
www.wiley.com/go/permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no
representations or warranties with respect to the accuracy or completeness of the contents of
this work and specifically disclaim all warranties, including without limitation warranties of
fitness for a particular purpose. No warranty may be created or extended by sales or
promotional materials. The advice and strategies contained herein may not be suitable for
every situation. This work is sold with the understanding that the publisher is not engaged in
rendering legal, accounting, or other professional services. If professional assistance is
required, the services of a competent professional person should be sought. Neither the
publisher nor the author shall be liable for damages arising herefrom. The fact that an
organization or Web site is referred to in this work as a citation and/or a potential source of
further information does not mean that the author or the publisher endorses the information
the organization or Web site may provide or recommendations it may make. Further, readers
should be aware that Internet Web sites listed in this work may have changed or disappeared
between when this work was written and when it is read.
For general information on our other products and services or to obtain technical support,
please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the
U.S. at (317) 572-3993 or fax (317) 572-4002.
Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some
material included with standard print versions of this book may not be included in e-books or
in print-on-demand. If this book refers to media such as a CD or DVD that is not included in
the version you purchased, you may download this material at booksupport.wiley.com. For
more information about Wiley products, visit www.wiley.com.
Library of Congress Control Number: 2020938185
TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered
trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other
countries, and may not be used without written permission. Oracle and Java are registered
trademarks of Oracle America, Inc. All other trademarks are the property of their respective
owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in
this book.
Loading page 19...
For my daughter, Sophia, you're the best combination of super silly
and super serious. You always know exactly what you want. May
you never lose that trait as you grow into a strong woman.
—Scott
Happy 20th anniversary to NYC FIRST and StuyPulse FRC Team
694.
—Jeanne
and super serious. You always know exactly what you want. May
you never lose that trait as you grow into a strong woman.
—Scott
Happy 20th anniversary to NYC FIRST and StuyPulse FRC Team
694.
—Jeanne
Loading page 20...
Acknowledgments
Scott and Jeanne would like to thank numerous individuals for their
contribution to this book. Thank you to Kathryn Duggan for guiding us
through the process and making the book better in so many ways.
Thank you to Janeice DelVecchio for being our technical editor as we
wrote this book. Janeice pointed out many subtle errors in addition to
the big ones. And thank you to Elena Felder for being our technical
proofreader and finding the errors that we managed to sneak by
Janeice. This book also wouldn't be possible without many people at
Wiley, including Kenyon Brown, Pete Gaughan, Christine O'Connor,
Kim Wimpsett, Johnna VanHoose Dinse and so many others.
Scott could not have reached this point without his wife, Patti, and
family, whose love and support makes this book possible. He would
like to thank his twin daughters, Olivia and Sophia, and youngest
daughter, Elysia, for their patience and understanding especially when
it was “time for Daddy to work in his office!” Scott would like to extend
his gratitude to his wonderfully patient co-author, Jeanne, on this,
their fifth book. He doesn't know how she puts up with him, but he's
glad she does and thrilled at the quality of books we produce. A big
thanks to Matt Dalen, who has been a great friend, sounding board,
and caring father to Olivia, Adeline, and newborn Henry. Finally, Scott
would like to thank his mother and retired teacher, Barbara Selikoff,
for teaching him the value of education, and his father, Mark Selikoff,
for instilling in him the benefits of working hard.
Jeanne would personally like to thank Chris Kreussling for knowing
more than a decade ago that she would someday write a book. He was
a great mentor for many years and definitely shaped her career. Sibon
Barman was helpful in getting feedback on the modules chapter, and
Susanta Chattopadhyay provided real-life use cases for both service
locator and serialization. Stuart Dabbs Halloway's 2001 book provided
examples of serialPeristentFields. Scott was a great co-author,
improving everything Jeanne wrote while writing his own chapters. A
big thank-you to everyone at CodeRanch.com who asked and responded
Scott and Jeanne would like to thank numerous individuals for their
contribution to this book. Thank you to Kathryn Duggan for guiding us
through the process and making the book better in so many ways.
Thank you to Janeice DelVecchio for being our technical editor as we
wrote this book. Janeice pointed out many subtle errors in addition to
the big ones. And thank you to Elena Felder for being our technical
proofreader and finding the errors that we managed to sneak by
Janeice. This book also wouldn't be possible without many people at
Wiley, including Kenyon Brown, Pete Gaughan, Christine O'Connor,
Kim Wimpsett, Johnna VanHoose Dinse and so many others.
Scott could not have reached this point without his wife, Patti, and
family, whose love and support makes this book possible. He would
like to thank his twin daughters, Olivia and Sophia, and youngest
daughter, Elysia, for their patience and understanding especially when
it was “time for Daddy to work in his office!” Scott would like to extend
his gratitude to his wonderfully patient co-author, Jeanne, on this,
their fifth book. He doesn't know how she puts up with him, but he's
glad she does and thrilled at the quality of books we produce. A big
thanks to Matt Dalen, who has been a great friend, sounding board,
and caring father to Olivia, Adeline, and newborn Henry. Finally, Scott
would like to thank his mother and retired teacher, Barbara Selikoff,
for teaching him the value of education, and his father, Mark Selikoff,
for instilling in him the benefits of working hard.
Jeanne would personally like to thank Chris Kreussling for knowing
more than a decade ago that she would someday write a book. He was
a great mentor for many years and definitely shaped her career. Sibon
Barman was helpful in getting feedback on the modules chapter, and
Susanta Chattopadhyay provided real-life use cases for both service
locator and serialization. Stuart Dabbs Halloway's 2001 book provided
examples of serialPeristentFields. Scott was a great co-author,
improving everything Jeanne wrote while writing his own chapters. A
big thank-you to everyone at CodeRanch.com who asked and responded
Loading page 21...
to questions and comments about our books. Finally, Jeanne would
like to thank all of the new programmers at CodeRanch.com and FIRST
robotics teams FRC 694, FTC 310, and FTC 479 for the constant
reminders of how new programmers think.
We'd both like to thank Marcus Biel for providing a European's take
on our localization content. Last but not least, both Scott and Jeanne
would like to give a big thank-you to the readers of all our books.
Hearing from all of you who enjoyed the book and passed the exam is
a great feeling. We'd also like to thank those who pointed out errors
and made suggestions for improvements in the 1Z0-815 Java 11 book.
As of April 2020, the top two were Nikolai Vinoku and Edmond Yong.
Also, an honorable mention to Jakub Chrobak.
like to thank all of the new programmers at CodeRanch.com and FIRST
robotics teams FRC 694, FTC 310, and FTC 479 for the constant
reminders of how new programmers think.
We'd both like to thank Marcus Biel for providing a European's take
on our localization content. Last but not least, both Scott and Jeanne
would like to give a big thank-you to the readers of all our books.
Hearing from all of you who enjoyed the book and passed the exam is
a great feeling. We'd also like to thank those who pointed out errors
and made suggestions for improvements in the 1Z0-815 Java 11 book.
As of April 2020, the top two were Nikolai Vinoku and Edmond Yong.
Also, an honorable mention to Jakub Chrobak.
Loading page 22...
About the Authors
Scott Selikoff is a professional software consultant, author, and
owner of Selikoff Solutions, LLC, which provides software
development solutions to businesses in the tri-state New York City
area. Skilled in a plethora of software languages and platforms, Scott
specializes in full-stack database-driven systems, cloud-based
applications, microservice architectures, and service-oriented
architectures.
A native of Toms River, New Jersey, Scott achieved his Bachelor of
Arts degree from Cornell University in Mathematics and Computer
Science in 2002, after three years of study. In 2003, he received his
Master of Engineering degree in Computer Science, also from Cornell
University.
As someone with a deep love of education, Scott has always enjoyed
teaching others new concepts. He's given lectures at Cornell University
and Rutgers University, as well as conferences including Oracle Code
One and The Server Side Java Symposium. Scott lives in New Jersey
with his loving wife, Patti; three amazing daughters, twins Olivia and
Sophia and little Elysia; and two very playful dogs, Webby and
Georgette. You can find out more about Scott at
www.linkedin.com/in/selikoff or follow him on Twitter
@ScottSelikoff.
Jeanne Boyarsky was selected as a Java Champion in 2019. She has
worked as a Java developer for more than 18 years at a bank in New
York City where she develops, mentors, and conducts training. Besides
being a senior moderator at CodeRanch.com in her free time, she works
on the forum code base. Jeanne also mentors the programming
division of a FIRST robotics team where she works with students just
getting started with Java. She also speaks at several conferences each
year.
Jeanne got her Bachelor of Arts degree in 2002 and her Master in
Computer Information Technology degree in 2005. She enjoyed
Scott Selikoff is a professional software consultant, author, and
owner of Selikoff Solutions, LLC, which provides software
development solutions to businesses in the tri-state New York City
area. Skilled in a plethora of software languages and platforms, Scott
specializes in full-stack database-driven systems, cloud-based
applications, microservice architectures, and service-oriented
architectures.
A native of Toms River, New Jersey, Scott achieved his Bachelor of
Arts degree from Cornell University in Mathematics and Computer
Science in 2002, after three years of study. In 2003, he received his
Master of Engineering degree in Computer Science, also from Cornell
University.
As someone with a deep love of education, Scott has always enjoyed
teaching others new concepts. He's given lectures at Cornell University
and Rutgers University, as well as conferences including Oracle Code
One and The Server Side Java Symposium. Scott lives in New Jersey
with his loving wife, Patti; three amazing daughters, twins Olivia and
Sophia and little Elysia; and two very playful dogs, Webby and
Georgette. You can find out more about Scott at
www.linkedin.com/in/selikoff or follow him on Twitter
@ScottSelikoff.
Jeanne Boyarsky was selected as a Java Champion in 2019. She has
worked as a Java developer for more than 18 years at a bank in New
York City where she develops, mentors, and conducts training. Besides
being a senior moderator at CodeRanch.com in her free time, she works
on the forum code base. Jeanne also mentors the programming
division of a FIRST robotics team where she works with students just
getting started with Java. She also speaks at several conferences each
year.
Jeanne got her Bachelor of Arts degree in 2002 and her Master in
Computer Information Technology degree in 2005. She enjoyed
Loading page 23...
getting her Master's degree in an online program while working full-
time. This was before online education was cool! Jeanne is also a
Distinguished Toastmaster and a Scrum Master. You can find out
more about Jeanne at www.jeanneboyarsky.com or follow her on Twitter
at @JeanneBoyarsky.
Scott and Jeanne are both moderators on the CodeRanch.com forums
and can be reached there for question and comments. They also co-
author a technical blog called Down Home Country Coding at
www.selikoff.net.
In addition to this book, Scott and Jeanne are also authors of the
following best-selling Java 8 certification books: OCA Oracle Certified
Associate Java SE 8 Programmer I Study Guide (Sybex, 2015) and
OCP Oracle Certified Professional Java SE 8 Programmer II Study
Guide (Sybex, 2016). These two books have been combined into the
single release: OCA/OCP Java SE 8 Programmer Certification Kit:
Exam 1Z0-808 and Exam 1Z0-809 (Sybex 2016). They have also
written a book of practice test questions for the Java 8 certification
exams: OCA/OCP Java SE 8 Programmer Practice Tests (Sybex,
2017). Their most recent book is OCP Oracle Certified Professional
Java SE 11 Programmer I Study Guide: Exam 1Z0-815 (Sybex, 2019).
time. This was before online education was cool! Jeanne is also a
Distinguished Toastmaster and a Scrum Master. You can find out
more about Jeanne at www.jeanneboyarsky.com or follow her on Twitter
at @JeanneBoyarsky.
Scott and Jeanne are both moderators on the CodeRanch.com forums
and can be reached there for question and comments. They also co-
author a technical blog called Down Home Country Coding at
www.selikoff.net.
In addition to this book, Scott and Jeanne are also authors of the
following best-selling Java 8 certification books: OCA Oracle Certified
Associate Java SE 8 Programmer I Study Guide (Sybex, 2015) and
OCP Oracle Certified Professional Java SE 8 Programmer II Study
Guide (Sybex, 2016). These two books have been combined into the
single release: OCA/OCP Java SE 8 Programmer Certification Kit:
Exam 1Z0-808 and Exam 1Z0-809 (Sybex 2016). They have also
written a book of practice test questions for the Java 8 certification
exams: OCA/OCP Java SE 8 Programmer Practice Tests (Sybex,
2017). Their most recent book is OCP Oracle Certified Professional
Java SE 11 Programmer I Study Guide: Exam 1Z0-815 (Sybex, 2019).
Loading page 24...
Introduction
Congratulations! If you are reading this, you've likely passed the 1Z0-
815 Programmer I exam, and you are now ready to start your journey
through the 1Z0-816 (Java SE Programmer II) exam. Or perhaps you
came here from an older version of the certification and are now
taking the IZ0-817 (Upgrade OCP Java 6, 7 & 8 to Java SE 11
Developer) exam. In either case, this book will guide you on your path
to becoming a Java 11 Oracle Certified Professional.
The Programmer II exam builds upon the Programmer I exam. You
are expected to know all of Programmer I material when taking the
second exam. Some objectives on the 1Z0-816 exam are the same as
those on the 1Z0-815 exam, such as the final modifier. Most are
implied. For example, the 1Z0-816 exam objectives don't mention if
statements, loops, and constructors. Clearly, you still need to know
these. We will also point out differences in Java 11 to help those of you
new to Java 11.
If you didn't score well on the 1Z0-815 exam or if it has been a while
since you took it, we recommend reviewing the book you used to study
for it. You really need to know the fundamentals well. If you've
misplaced your study materials, feel free to check out our 1Z0-815
book, OCP Oracle Certified Professional Java SE 11 Programmer I
Study Guide: Exam 1Z0-815 (Sybex, 2019).
In the introduction, we will cover important information about the
exam before moving on to information about this book. Finally, this
introduction ends with an assessment test so you can see how much
studying lays ahead of you.
Understanding the Exam
At the end of the day, the exam is a list of questions. The more you
know about the structure of the exam, the better you are likely to do.
For example, knowing how many questions the exam contains allows
you to manage your progress and time remaining better. In this
Congratulations! If you are reading this, you've likely passed the 1Z0-
815 Programmer I exam, and you are now ready to start your journey
through the 1Z0-816 (Java SE Programmer II) exam. Or perhaps you
came here from an older version of the certification and are now
taking the IZ0-817 (Upgrade OCP Java 6, 7 & 8 to Java SE 11
Developer) exam. In either case, this book will guide you on your path
to becoming a Java 11 Oracle Certified Professional.
The Programmer II exam builds upon the Programmer I exam. You
are expected to know all of Programmer I material when taking the
second exam. Some objectives on the 1Z0-816 exam are the same as
those on the 1Z0-815 exam, such as the final modifier. Most are
implied. For example, the 1Z0-816 exam objectives don't mention if
statements, loops, and constructors. Clearly, you still need to know
these. We will also point out differences in Java 11 to help those of you
new to Java 11.
If you didn't score well on the 1Z0-815 exam or if it has been a while
since you took it, we recommend reviewing the book you used to study
for it. You really need to know the fundamentals well. If you've
misplaced your study materials, feel free to check out our 1Z0-815
book, OCP Oracle Certified Professional Java SE 11 Programmer I
Study Guide: Exam 1Z0-815 (Sybex, 2019).
In the introduction, we will cover important information about the
exam before moving on to information about this book. Finally, this
introduction ends with an assessment test so you can see how much
studying lays ahead of you.
Understanding the Exam
At the end of the day, the exam is a list of questions. The more you
know about the structure of the exam, the better you are likely to do.
For example, knowing how many questions the exam contains allows
you to manage your progress and time remaining better. In this
Loading page 25...
section, we discuss the details of the exam, along with some history of
previous certification exams.
Broader Objectives
In previous certification exams, the list of exam objectives tended
to include specific topics, classes, and APIs that you needed to
know for the exam. For example, take a look at an objective for the
1Z0-809 (OCP 8) exam:
Use BufferedReader, BufferedWriter, File, FileReader,
FileWriter, FileInputStream, FileOutputStream,
ObjectOutputStream, ObjectInputStream, and PrintWriter in
the java.io package.
Now compare it with the equivalent objective for the 1Z0-816 (OCP
11) exam:
Use I/O Streams to read and write files
Notice the difference? The older version is more detailed and
describes specific classes you will need to understand. The newer
version is a lot vaguer. It also gives the exam writers a lot more
freedom to insert a new feature, for example, without having to
update the list of objectives.
So how do you know what to study? By reading this study guide of
course! We've spent years studying the certification exams, in all of
their forms, and have carefully cultivated topics, material, and
practice questions that we are confident can lead to successfully
passing the exam.
Choosing Which Exam to Take
Java is now 25 years old, celebrating being “born” in 1995. As with
anything 25 years old, there is a good amount of history and variation
between different versions of Java. Over the years, the certification
exams have changed to cover different topics. The names of the exams
previous certification exams.
Broader Objectives
In previous certification exams, the list of exam objectives tended
to include specific topics, classes, and APIs that you needed to
know for the exam. For example, take a look at an objective for the
1Z0-809 (OCP 8) exam:
Use BufferedReader, BufferedWriter, File, FileReader,
FileWriter, FileInputStream, FileOutputStream,
ObjectOutputStream, ObjectInputStream, and PrintWriter in
the java.io package.
Now compare it with the equivalent objective for the 1Z0-816 (OCP
11) exam:
Use I/O Streams to read and write files
Notice the difference? The older version is more detailed and
describes specific classes you will need to understand. The newer
version is a lot vaguer. It also gives the exam writers a lot more
freedom to insert a new feature, for example, without having to
update the list of objectives.
So how do you know what to study? By reading this study guide of
course! We've spent years studying the certification exams, in all of
their forms, and have carefully cultivated topics, material, and
practice questions that we are confident can lead to successfully
passing the exam.
Choosing Which Exam to Take
Java is now 25 years old, celebrating being “born” in 1995. As with
anything 25 years old, there is a good amount of history and variation
between different versions of Java. Over the years, the certification
exams have changed to cover different topics. The names of the exams
Loading page 26...
have even changed. This book covers the Java 11 exam.
Those with more recent certifications might remember that Oracle
released two exams each for Java 7 and Java 8. The first exam tended
to be easier, and completing it granted you the title of Oracle Certified
Associate (OCA). The second exam was a lot more difficult, with much
longer questions, and completing it granted you the title of Oracle
Certified Professional (OCP).
Oracle did not release an exam for Java 9 or Java 10, probably because
neither of these is a Long Term Support (LTS) release. With Java 11,
Oracle decided to discontinue both the OCA certification and its
associated exam. You still have to take two exams to earn an OCP title.
The difference is that now you do not obtain a certification title from
completing the first exam.
Figure I.1 shows these past and current Java certifications. This image
is helpful if you run into material online that references older exams. It
is also helpful if you have an older certification and are trying to
determine where it fits in.
FIGURE I.1 Past and current Java certifications
Figure I.2 shows the exams you need to take in order to earn the latest
Java certification if you don't have any existing Java certifications. If
you haven't taken the 1Z0-815 exam yet, see our OCP Oracle Certified
Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815
(Sybex, 2019).
Those with more recent certifications might remember that Oracle
released two exams each for Java 7 and Java 8. The first exam tended
to be easier, and completing it granted you the title of Oracle Certified
Associate (OCA). The second exam was a lot more difficult, with much
longer questions, and completing it granted you the title of Oracle
Certified Professional (OCP).
Oracle did not release an exam for Java 9 or Java 10, probably because
neither of these is a Long Term Support (LTS) release. With Java 11,
Oracle decided to discontinue both the OCA certification and its
associated exam. You still have to take two exams to earn an OCP title.
The difference is that now you do not obtain a certification title from
completing the first exam.
Figure I.1 shows these past and current Java certifications. This image
is helpful if you run into material online that references older exams. It
is also helpful if you have an older certification and are trying to
determine where it fits in.
FIGURE I.1 Past and current Java certifications
Figure I.2 shows the exams you need to take in order to earn the latest
Java certification if you don't have any existing Java certifications. If
you haven't taken the 1Z0-815 exam yet, see our OCP Oracle Certified
Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815
(Sybex, 2019).
Loading page 27...
FIGURE I.2 Latest Java certification exams
If you already hold a Java certification, you need to decide which exam
you can take to earn the Java 11 OCP title. Besides the 1Z0-816
Programmer II exam, there is also a 1Z0-817 Upgrade exam. Oracle
has defined a number of upgrade paths to achieve the OCP title, shown
in Figure I.3.
FIGURE I.3 Exam prerequisites
In a nutshell, you can take the 1Z0-816 exam if you passed the 1Z0-815
If you already hold a Java certification, you need to decide which exam
you can take to earn the Java 11 OCP title. Besides the 1Z0-816
Programmer II exam, there is also a 1Z0-817 Upgrade exam. Oracle
has defined a number of upgrade paths to achieve the OCP title, shown
in Figure I.3.
FIGURE I.3 Exam prerequisites
In a nutshell, you can take the 1Z0-816 exam if you passed the 1Z0-815
Loading page 28...
exam or hold the OCA 7 or 8 title. Oracle's goal here is to help people
get to Java 11 OCP certification if they are halfway through the journey
to OCP certification.
If you hold a recent OCP 6, 7, or 8 certification title (or even the older
Sun Certified Programmer 6 title), then you can take the 1Z0-817 exam
to obtain the Java 11 OCP title with just one exam. Those with a Java
certification older than this will have to start over and take the 1Z0-
815 exam, followed by the 1Z0-816 exam.
What if you hold both OCA and OCP Java 7 or 8 certifications? Well,
in that case you have a decision to make. Passing either the 1Z0-816 or
1Z0-817 exam will grant you the Java 11 OCP title. We recommend
reviewing the objectives between the two exams and deciding which
one you feel more comfortable with.
There are also two edge cases. Those who passed the OCA 6 exam
must still take the 1Z0-815 exam. The OCA 6 exam covered far less
material than the OCA 7 or 8.
Additionally, those who passed the OCP 7 or 8 exam but never
received the OCP title because they didn't pass the OCA exam, need to
take the 1Z0-815 exam. After that, you have a choice of the 1Z0-816
exam or the 1Z0-817 exam.
If you're not sure which exam you should take, you can
post questions on CodeRanch.com, and the community will be happy
to help. You might even get a response from Scott or Jeanne!
Taking the Upgrade Exam
The chapters of this book are structured for those taking the 1Z0-816
Programmer II exam. As we said earlier, though, you can easily rely on
this book to prepare for the 1Z0-817 exam. If, after reading the
previous section, you decide to take the 1Z0-817 exam, then you
should be aware that the objectives between the two exams are not the
get to Java 11 OCP certification if they are halfway through the journey
to OCP certification.
If you hold a recent OCP 6, 7, or 8 certification title (or even the older
Sun Certified Programmer 6 title), then you can take the 1Z0-817 exam
to obtain the Java 11 OCP title with just one exam. Those with a Java
certification older than this will have to start over and take the 1Z0-
815 exam, followed by the 1Z0-816 exam.
What if you hold both OCA and OCP Java 7 or 8 certifications? Well,
in that case you have a decision to make. Passing either the 1Z0-816 or
1Z0-817 exam will grant you the Java 11 OCP title. We recommend
reviewing the objectives between the two exams and deciding which
one you feel more comfortable with.
There are also two edge cases. Those who passed the OCA 6 exam
must still take the 1Z0-815 exam. The OCA 6 exam covered far less
material than the OCA 7 or 8.
Additionally, those who passed the OCP 7 or 8 exam but never
received the OCP title because they didn't pass the OCA exam, need to
take the 1Z0-815 exam. After that, you have a choice of the 1Z0-816
exam or the 1Z0-817 exam.
If you're not sure which exam you should take, you can
post questions on CodeRanch.com, and the community will be happy
to help. You might even get a response from Scott or Jeanne!
Taking the Upgrade Exam
The chapters of this book are structured for those taking the 1Z0-816
Programmer II exam. As we said earlier, though, you can easily rely on
this book to prepare for the 1Z0-817 exam. If, after reading the
previous section, you decide to take the 1Z0-817 exam, then you
should be aware that the objectives between the two exams are not the
Loading page 29...
same.
To help support those taking the 1Z0-817 exam, we include Appendix
A, “The Upgrade Exam,” as part of this book. This appendix includes
material you would have learned when taking the 1Z0-815
Programmer I exam that you will need to know for the 1Z0-817 exam.
Because of this, you should actually read this appendix first. For
example, you need to first know how to create a module before you can
create a module service in Chapter 6, “Modular Applications.”
While we think every chapter is worth reading, here are some chapters
you can skip if you are taking the 1Z0-817 exam:
Chapter 2, “Annotations”
Chapter 8, “I/O”
Chapter 10, “JDBC”
Chapter 11, “Security”
For other chapters, the 1Z0-817 exam may involve understanding the
entire chapter or select portions of the chapter. We've included a
mapping of all of the upgrade exam objectives and their associated
chapters in the “Reviewing Exam Objectives” section of this
introduction.
Changes to the Exam
At the time of this book being published, all OCP 11 certification exams
contain 80 questions and have a duration of 3 hours. The 1Z0-816
exam requires a passing score of 63 percent, while the 1Z0-817 exam
requires a passing score of 61 percent.
Oracle has a tendency to fiddle with the length of the exam and the
passing score once it comes out. Oracle also likes to “tweak” the exam
topics over time. It wouldn't be a surprise for Oracle to make minor
changes to the exam objectives, the number of questions, or the
passing score after this book goes to print.
If there are any changes to the exam after this book is published, we
will note them on the book page of our blog.
To help support those taking the 1Z0-817 exam, we include Appendix
A, “The Upgrade Exam,” as part of this book. This appendix includes
material you would have learned when taking the 1Z0-815
Programmer I exam that you will need to know for the 1Z0-817 exam.
Because of this, you should actually read this appendix first. For
example, you need to first know how to create a module before you can
create a module service in Chapter 6, “Modular Applications.”
While we think every chapter is worth reading, here are some chapters
you can skip if you are taking the 1Z0-817 exam:
Chapter 2, “Annotations”
Chapter 8, “I/O”
Chapter 10, “JDBC”
Chapter 11, “Security”
For other chapters, the 1Z0-817 exam may involve understanding the
entire chapter or select portions of the chapter. We've included a
mapping of all of the upgrade exam objectives and their associated
chapters in the “Reviewing Exam Objectives” section of this
introduction.
Changes to the Exam
At the time of this book being published, all OCP 11 certification exams
contain 80 questions and have a duration of 3 hours. The 1Z0-816
exam requires a passing score of 63 percent, while the 1Z0-817 exam
requires a passing score of 61 percent.
Oracle has a tendency to fiddle with the length of the exam and the
passing score once it comes out. Oracle also likes to “tweak” the exam
topics over time. It wouldn't be a surprise for Oracle to make minor
changes to the exam objectives, the number of questions, or the
passing score after this book goes to print.
If there are any changes to the exam after this book is published, we
will note them on the book page of our blog.
Loading page 30...
www.selikoff.net/ocp11-2
Exam Questions
The exams consist entirely of multiple-choice questions. There are
between four and seven possible answers. If a question has more than
one answer, the question specifically states exactly how many correct
answers there are. This book does not do that. We say “Choose all that
apply” to make the questions harder. This means the questions in this
book are generally harder than those on the exam. The idea is to give
you more practice so you can spot the correct answer more easily on
the real exam.
If you read about older versions of the exam online, you might see
references to drag-and-drop questions. These questions had you do a
puzzle on how to complete a piece of code. Luckily, these are no longer
on the exam.
Many of the questions on the exam are code snippets rather than full
classes. Saving space by not including imports and/or class definitions
leaves room for lots of other code. For example, it is common to come
across classes on the exam with portions omitted, like so:
public class Zoo {
String name;
// Getters/Setters/Constructors omitted
}
In this case, you would assume methods like getName() and setName(),
as well as related constructors, exist. For example, we would expect
this code to compile:
var name = new Zoo("Java Zoo").getName();
Out-of-Scope Material
When you take the exam, you may see some questions that appear to
be out of scope. Don't panic! Often, these questions do not require
knowing anything about the topic to answer the question. For
example, after reading this book, you should be able to spot that the
following does not compile, even if you've never heard of LocalDate
Exam Questions
The exams consist entirely of multiple-choice questions. There are
between four and seven possible answers. If a question has more than
one answer, the question specifically states exactly how many correct
answers there are. This book does not do that. We say “Choose all that
apply” to make the questions harder. This means the questions in this
book are generally harder than those on the exam. The idea is to give
you more practice so you can spot the correct answer more easily on
the real exam.
If you read about older versions of the exam online, you might see
references to drag-and-drop questions. These questions had you do a
puzzle on how to complete a piece of code. Luckily, these are no longer
on the exam.
Many of the questions on the exam are code snippets rather than full
classes. Saving space by not including imports and/or class definitions
leaves room for lots of other code. For example, it is common to come
across classes on the exam with portions omitted, like so:
public class Zoo {
String name;
// Getters/Setters/Constructors omitted
}
In this case, you would assume methods like getName() and setName(),
as well as related constructors, exist. For example, we would expect
this code to compile:
var name = new Zoo("Java Zoo").getName();
Out-of-Scope Material
When you take the exam, you may see some questions that appear to
be out of scope. Don't panic! Often, these questions do not require
knowing anything about the topic to answer the question. For
example, after reading this book, you should be able to spot that the
following does not compile, even if you've never heard of LocalDate
Loading page 31...
30 more pages available. Scroll down to load them.
Preview Mode
Sign in to access the full document!
100%
Study Now!
XY-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
AI Assistant
Document Details
Subject
Azure Networking Practice Exam