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.8
92
9 months ago
Preview (31 of 996 Pages)
100%
Purchase to unlock

Page 1

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 1 preview image

Loading page image...

Page 2

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 2 preview image

Loading page image...

Page 3

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 3 preview image

Loading page image...

Table of ContentsCoverAcknowledgmentsAbout the AuthorsIntroductionUnderstanding the ExamReading This BookPreparing for the ExamTaking the ExamObjective MapTaking the Assessment TestChapter 1: Java FundamentalsApplying thefinalModifierWorking with EnumsCreating Nested ClassesUnderstanding Interface MembersIntroducing Functional ProgrammingSummaryExam EssentialsReview QuestionsChapter 2: AnnotationsIntroducing AnnotationsCreating Custom AnnotationsApplying AnnotationsDeclaring Annotation-Specific AnnotationsUsing Common AnnotationsSummaryExam Essentials

Page 4

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 4 preview image

Loading page image...

Review QuestionsChapter 3: Generics and CollectionsUsing Method ReferencesUsing Wrapper ClassesUsing the Diamond OperatorUsing Lists, Sets, Maps, and QueuesSorting DataWorking with GenericsSummaryExam EssentialsReview QuestionsChapter 4: Functional ProgrammingWorking with Built-in Functional InterfacesReturning anOptionalUsing StreamsWorking with Primitive StreamsWorking with Advanced Stream Pipeline ConceptsSummaryExam EssentialsReview QuestionsChapter 5: Exceptions, Assertions, and LocalizationReviewing ExceptionsCreating Custom ExceptionsAutomating Resource ManagementDeclaring AssertionsWorking with Dates and TimesSupporting Internationalization and LocalizationLoading Properties with Resource BundlesSummary

Page 5

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 5 preview image

Loading page image...

Exam EssentialsReview QuestionsChapter 6: Modular ApplicationsReviewing Module DirectivesComparing Types of ModulesAnalyzing JDK DependenciesMigrating an ApplicationCreating a ServiceSummaryExam EssentialsReview QuestionsChapter 7: ConcurrencyIntroducing ThreadsCreating Threads with the Concurrency APIWriting Thread-Safe CodeUsing Concurrent CollectionsIdentifying Threading ProblemsWorking with Parallel StreamsSummaryExam EssentialsReview QuestionsChapter 8: I/OUnderstanding Files and DirectoriesIntroducing I/O StreamsCommon I/O Stream OperationsWorking with I/O Stream ClassesInteracting with UsersSummaryExam Essentials

Page 6

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 6 preview image

Loading page image...

Review QuestionsChapter 9: NIO.2Introducing NIO.2Interacting with PathsOperating on Files and DirectoriesManaging File AttributesApplying Functional ProgrammingComparing Legacyjava.io.Fileand NIO.2 MethodsSummaryExam EssentialsReview QuestionsChapter 10: JDBCIntroducing Relational Databases and SQLIntroducing the Interfaces of JDBCConnecting to a DatabaseWorking with aPreparedStatementGetting Data from aResultSetCalling aCallableStatementClosing Database ResourcesSummaryExam EssentialsReview QuestionsChapter 11: SecurityDesigning a Secure ObjectIntroducing Injection and Input ValidationWorking with Confidential InformationSerializing and Deserializing ObjectsConstructing Sensitive ObjectsPreventing Denial of Service Attacks

Page 7

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 7 preview image

Loading page image...

SummaryExam EssentialsReview QuestionsAppendix A: The Upgrade ExamWorking with Local Variable Type InferenceIntroducing ModulesCreating and Running a Modular ProgramUpdating Our Example for Multiple ModulesDiving into themodule-infoFileDiscovering ModulesReviewing Command-Line OptionsSummaryExam EssentialsReview QuestionsAppendix B: Answers to Review QuestionsChapter 1: Java FundamentalsChapter 2: AnnotationsChapter 3: Generics and CollectionsChapter 4: Functional ProgrammingChapter 5: Exceptions, Assertions, and LocalizationChapter 6: Modular ApplicationsChapter 7: ConcurrencyChapter 8: I/OChapter 9: NIO.2Chapter 10: JDBCChapter 11: SecurityAppendix A: The Upgrade ExamIndexOnline Test Bank

Page 8

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 8 preview image

Loading page image...

Register and Access the Online Test BankEnd User License AgreementList of TablesChapter 1TABLE 1.1 Modifiers in nested classesTABLE 1.2 Members in nested classesTABLE 1.3 Nested class access rulesTABLE 1.4 Interface member typesTABLE 1.5 Interface member accessChapter 2TABLE 2.1 Values for the@TargetannotationTABLE 2.2 Values for the @Retention annotationTABLE 2.3 Annotation-specific annotationsTABLE 2.4 Common @SuppressWarningsvaluesTABLE 2.5 Understanding common annotationsTABLE 2.6 Applying common annotationsChapter 3TABLE 3.1 Functional interfaces used in this chapterTABLE 3.2 Method referencesTABLE 3.3 Wrapper classesTABLE 3.4 Factory methods to create a ListTABLE 3.5 List methodsTABLE 3.6 Queue methodsTABLE 3.7 Map methodsTABLE 3.8 Behavior of the merge() method

Page 9

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 9 preview image

Loading page image...

TABLE 3.9 Java Collections Framework typesTABLE 3.10 Collection attributesTABLE 3.11 Comparison of Comparable and ComparatorTABLE 3.12 Helper static methods for building a ComparatorTABLE 3.13 Helper default methods for building aComparatorTABLE 3.14 Types of boundsTABLE 3.15 Why we need a lower boundChapter 4TABLE 4.1 Common functional interfacesTABLE 4.2 Convenience methodsTABLE 4.3Optionalinstance methodsTABLE 4.4 Intermediate vs. terminal operationsTABLE 4.5 Creating a sourceTABLE 4.6 Terminal stream operationsTABLE 4.7 Common primitive stream methodsTABLE 4.8 Mapping methods between types of streamsTABLE 4.9 Function parameters when mapping betweentypes of streamsTABLE 4.10 Optional types for primitivesTABLE 4.11 Common functional interfaces for primitivesTABLE 4.12 Primitive-specific functional interfacesTABLE 4.13 Examples of grouping/partitioning collectorsChapter 5TABLE 5.1 Unchecked exceptionsTABLE 5.2 Checked exceptionsTABLE 5.3 Assertion applications

Page 10

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 10 preview image

Loading page image...

TABLE 5.4 Date and time typesTABLE 5.5 Common date/time symbolsTABLE 5.6 Supported date/time symbolsTABLE 5.7 Factory methods to get aNumberFormatTABLE 5.8DecimalFormatsymbolsTABLE 5.9 Factory methods to get aDateTimeFormatterTABLE 5.10Locale.CategoryvaluesTABLE 5.11 Picking a resource bundle for French/Francewith default locale En...TABLE 5.12 Selecting resource bundle propertiesChapter 6TABLE 6.1 Common module directivesTABLE 6.2 Practicing with automatic module namesTABLE 6.3 Properties of modules typesTABLE 6.4 Common modulesTABLE 6.5 Java modules prefixed with javaTABLE 6.6 Java modules prefixed with jdkTABLE 6.7 Comparing migration strategiesTABLE 6.8 Reviewing servicesChapter 7TABLE 7.1ExecutorServicemethodsTABLE 7.2FuturemethodsTABLE 7.3TimeUnitvaluesTABLE 7.4ScheduledExecutorServicemethodsTABLE 7.5Executorsfactory methodsTABLE 7.6 Atomic classes

Page 11

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 11 preview image

Loading page image...

TABLE 7.7 Common atomic methodsTABLE 7.8LockmethodsTABLE 7.9 Concurrent collection classesTABLE 7.10BlockingQueuewaiting methodsTABLE 7.11 Synchronized collections methodsChapter 8TABLE 8.1 Commonly used java.io.File methodsTABLE 8.2 The java.io abstract stream base classesTABLE 8.3 The java.io concrete stream classesTABLE 8.4 Common I/O stream methodsTABLE 8.5 Common print stream format() symbolsChapter 9TABLE 9.1 File system symbolsTABLE 9.2 Common NIO.2 method argumentsTABLE 9.3 Path methodsTABLE 9.4FilesmethodsTABLE 9.5 The attributes and view typesTABLE 9.6 Walking a directory with a cycle using breadth-first searchTABLE 9.7 Comparison ofjava.io.Fileand NIO.2 methodsChapter 10TABLE 10.1 CRUD operationsTABLE 10.2 SQL runnable by theexecutemethodTABLE 10.3 Return types ofexecutemethodsTABLE 10.4PreparedStatementmethodsTABLE 10.5ResultSet getmethods

Page 12

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 12 preview image

Loading page image...

TABLE 10.6 Sample stored proceduresTABLE 10.7 Stored procedure parameter typesChapter 11TABLE 11.1 Types of confidential dataTABLE 11.2 Methods for serialization and deserializationAppendix ATABLE A.1 Options you need to know for using modules withjavacTABLE A.2 Options you need to know for using modules withjavaTABLE A.3 Access control with modulesTABLE A.4 Modes using jmodTABLE A.5 Comparing command-line operationsTABLE A.6 Options you need to know for the exam:javacTABLE A.7 Options you need to know for the exam:javaTABLE A.8 Options you need to know for the exam:jarTABLE A.9 Options you need to know for the exam:jdepsList of IllustrationsIntroductionFIGURE I.1 Past and current Java certificationsFIGURE I.2 Latest Java certification examsFIGURE I.3 Exam prerequisitesChapter 1FIGURE 1.1 Lambda syntax omitting optional partsFIGURE 1.2 Lambda syntax, including optional partsChapter 2

Page 13

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 13 preview image

Loading page image...

FIGURE 2.1 Annotation declarationFIGURE 2.2 Using an annotationChapter 3FIGURE 3.1 TheCollectioninterface is the root of allcollections except ma...FIGURE 3.2 Example of aListFIGURE 3.3 Example of aSetFIGURE 3.4 Examples of aHashSetandTreeSetFIGURE 3.5 Example of aQueueFIGURE 3.6 Working with a queueFIGURE 3.7 Example of aMapChapter 4FIGURE 4.1OptionalFIGURE 4.2 Stream pipelineFIGURE 4.3 Steps in running a stream pipelineFIGURE 4.4 A stream pipeline with a limitFIGURE 4.5 Stream pipeline with multiple intermediateoperationsChapter 5FIGURE 5.1 The syntax of atrystatementFIGURE 5.2 The syntax of a try with resources statementFIGURE 5.3 Categories of exceptionsFIGURE 5.4 The syntax ofassertstatementsFIGURE 5.5LocaleformatsChapter 6FIGURE 6.1 A named moduleFIGURE 6.2 An automatic module

Page 14

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 14 preview image

Loading page image...

FIGURE 6.3 An unnamed moduleFIGURE 6.4 Determining the orderFIGURE 6.5 Determining the order when not uniqueFIGURE 6.6 Bottom-up migrationFIGURE 6.7 Top-down migrationFIGURE 6.8 First attempt at decompositionFIGURE 6.9 Removing the cyclic dependenciesFIGURE 6.10 Modules in the tour applicationChapter 7FIGURE 7.1 Process modelFIGURE 7.2ExecutorServicelife cycleFIGURE 7.3 Lack of thread synchronizationFIGURE 7.4 Thread synchronization using atomic operationsFIGURE 7.5 Race condition on user creationChapter 8FIGURE 8.1 Directory and file hierarchyFIGURE 8.2 Visual representation of a streamFIGURE 8.3 Serialization processFIGURE 8.4 Diagram of I/O stream classesChapter 9FIGURE 9.1 File system with a symbolic linkFIGURE 9.2 NIO.2 class and interface relationshipsFIGURE 9.3 Relative paths using path symbolsFIGURE 9.4 Comparing file uniquenessFIGURE 9.5 File and directory as a tree structureFIGURE 9.6 File system with cycle

Page 15

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 15 preview image

Loading page image...

Chapter 10FIGURE 10.1 Tables in our relational databaseFIGURE 10.2 Key JDBC interfacesFIGURE 10.3 The JDBC URL formatFIGURE 10.4 Types of statementsFIGURE 10.5 TheResultSetcursorChapter 11FIGURE 11.1CloneablelogicFIGURE 11.2 Hours tableFIGURE 11.3 Directory structureFIGURE 11.4 Writing and reading an employeeAppendix AFIGURE A.1 Design of a modular systemFIGURE A.2 Looking inside a moduleFIGURE A.3 Contents ofzoo.animal.feedingFIGURE A.4 Modulezoo.animal.feedingdirectory structureFIGURE A.5 Running a module usingjavaFIGURE A.6 Modulezoo.animal.feedingdirectory structurewithclassandjar...FIGURE A.7 Modules depending onzoo.animal.feedingFIGURE A.8 Contents ofzoo.animal.careFIGURE A.9 Modulezoo.animal.caredirectory structureFIGURE A.10 Dependencies forzoo.animal.talksFIGURE A.11 Contents ofzoo.animal.talksFIGURE A.12 Contents ofzoo.staffFIGURE A.13 Dependencies forzoo.staff

Page 16

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 16 preview image

Loading page image...

FIGURE A.14 Transitive dependency version of our modules

Page 17

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 17 preview image

Loading page image...

OCP Oracle®CertifiedProfessional Java®SE 11Programmer IIStudy Guide Exam 1Z0-816 and Exam 1Z0-817Scott SelikoffJeanne Boyarsky

Page 18

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 18 preview image

Loading page image...

Page 19

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 19 preview image

Loading page image...

Copyright © 2020 by John Wiley & Sons, Inc., Indianapolis, IndianaPublished simultaneously in Canada and the United Kingdom.ISBN: 978-1-119-61762-4ISBN: 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 inany form or by any means, electronic, mechanical, photocopying, recording, scanning orotherwise, except as permitted under Sections 107 or 108 of the 1976 United States CopyrightAct, without either the prior written permission of the Publisher, or authorization throughpayment of the appropriate per-copy fee to the Copyright Clearance Center, 222 RosewoodDrive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisherfor 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 atwww.wiley.com/go/permissions.Limit of Liability/Disclaimer of Warranty: The publisher and the author make norepresentations or warranties with respect to the accuracy or completeness of the contents ofthis work and specifically disclaim all warranties, including without limitation warranties offitness for a particular purpose. No warranty may be created or extended by sales orpromotional materials. The advice and strategies contained herein may not be suitable forevery situation. This work is sold with the understanding that the publisher is not engaged inrendering legal, accounting, or other professional services. If professional assistance isrequired, the services of a competent professional person should be sought. Neither thepublisher nor the author shall be liable for damages arising herefrom. The fact that anorganization or Web site is referred to in this work as a citation and/or a potential source offurther information does not mean that the author or the publisher endorses the informationthe organization or Web site may provide or recommendations it may make. Further, readersshould be aware that Internet Web sites listed in this work may have changed or disappearedbetween 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 theU.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. Somematerial included with standard print versions of this book may not be included in e-books orin print-on-demand. If this book refers to media such as a CD or DVD that is not included inthe version you purchased, you may download this material atbooksupport.wiley.com. Formore information about Wiley products, visitwww.wiley.com.Library of Congress Control Number: 2020938185TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registeredtrademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and othercountries, and may not be used without written permission. Oracle and Java are registeredtrademarks of Oracle America, Inc. All other trademarks are the property of their respectiveowners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned inthis book.

Page 20

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 20 preview image

Loading page image...

For my daughter, Sophia, you're the best combination of super sillyand super serious. You always know exactly what you want. Mayyou never lose that trait as you grow into a strong woman.—ScottHappy 20th anniversary to NYC FIRST and StuyPulse FRC Team694.—Jeanne

Page 21

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 21 preview image

Loading page image...

AcknowledgmentsScott and Jeanne would like to thank numerous individuals for theircontribution to this book. Thank you to Kathryn Duggan for guiding usthrough the process and making the book better in so many ways.Thank you to Janeice DelVecchio for being our technical editor as wewrote this book. Janeice pointed out many subtle errors in addition tothe big ones. And thank you to Elena Felder for being our technicalproofreader and finding the errors that we managed to sneak byJaneice. This book also wouldn't be possible without many people atWiley, 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, andfamily, whose love and support makes this book possible. He wouldlike to thank his twin daughters, Olivia and Sophia, and youngestdaughter, Elysia, for their patience and understanding especially whenit was “time for Daddy to work in his office!” Scott would like to extendhis 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'sglad she does and thrilled at the quality of books we produce. A bigthanks to Matt Dalen, who has been a great friend, sounding board,and caring father to Olivia, Adeline, and newborn Henry. Finally, Scottwould 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 knowingmore than a decade ago that she would someday write a book. He wasa great mentor for many years and definitely shaped her career. SibonBarman was helpful in getting feedback on the modules chapter, andSusanta Chattopadhyay provided real-life use cases for both servicelocator and serialization. Stuart Dabbs Halloway's 2001 book providedexamples ofserialPeristentFields. Scott was a great co-author,improving everything Jeanne wrote while writing his own chapters. Abig thank-you to everyone atCodeRanch.comwho asked and responded

Page 22

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 22 preview image

Loading page image...

to questions and comments about our books. Finally, Jeanne wouldlike to thank all of the new programmers atCodeRanch.comand FIRSTrobotics teams FRC 694, FTC 310, and FTC 479 for the constantreminders of how new programmers think.We'd both like to thank Marcus Biel for providing a European's takeon our localization content. Last but not least, both Scott and Jeannewould 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 isa great feeling. We'd also like to thank those who pointed out errorsand 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.

Page 23

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 23 preview image

Loading page image...

About the AuthorsScott Selikoffis a professional software consultant, author, andowner of Selikoff Solutions, LLC, which provides softwaredevelopment solutions to businesses in the tri-state New York Cityarea. Skilled in a plethora of software languages and platforms, Scottspecializes in full-stack database-driven systems, cloud-basedapplications, microservice architectures, and service-orientedarchitectures.A native of Toms River, New Jersey, Scott achieved his Bachelor ofArts degree from Cornell University in Mathematics and ComputerScience in 2002, after three years of study. In 2003, he received hisMaster of Engineering degree in Computer Science, also from CornellUniversity.As someone with a deep love of education, Scott has always enjoyedteaching others new concepts. He's given lectures at Cornell Universityand Rutgers University, as well as conferences including Oracle CodeOne and The Server Side Java Symposium. Scott lives in New Jerseywith his loving wife, Patti; three amazing daughters, twins Olivia andSophia and little Elysia; and two very playful dogs, Webby andGeorgette. You can find out more about Scott atwww.linkedin.com/in/selikoffor follow him on Twitter@ScottSelikoff.Jeanne Boyarskywas selected as a Java Champion in 2019. She hasworked as a Java developer for more than 18 years at a bank in NewYork City where she develops, mentors, and conducts training. Besidesbeing a senior moderator atCodeRanch.comin her free time, she workson the forum code base. Jeanne also mentors the programmingdivision of a FIRST robotics team where she works with students justgetting started with Java. She also speaks at several conferences eachyear.Jeanne got her Bachelor of Arts degree in 2002 and her Master inComputer Information Technology degree in 2005. She enjoyed

Page 24

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 24 preview image

Loading page image...

getting her Master's degree in an online program while working full-time. This was before online education was cool! Jeanne is also aDistinguished Toastmaster and a Scrum Master. You can find outmore about Jeanne atwww.jeanneboyarsky.comor follow her on Twitterat@JeanneBoyarsky.Scott and Jeanne are both moderators on theCodeRanch.comforumsand can be reached there for question and comments. They also co-author a technical blog called Down Home Country Coding atwww.selikoff.net.In addition to this book, Scott and Jeanne are also authors of thefollowing best-selling Java 8 certification books:OCA Oracle CertifiedAssociate Java SE 8 Programmer I Study Guide(Sybex, 2015) andOCP Oracle Certified Professional Java SE 8 Programmer II StudyGuide(Sybex, 2016). These two books have been combined into thesingle release:OCA/OCP Java SE 8 Programmer Certification Kit:Exam 1Z0-808 and Exam 1Z0-809(Sybex 2016). They have alsowritten a book of practice test questions for the Java 8 certificationexams:OCA/OCP Java SE 8 Programmer Practice Tests(Sybex,2017). Their most recent book isOCP Oracle Certified ProfessionalJava SE 11 Programmer I Study Guide: Exam 1Z0-815(Sybex, 2019).

Page 25

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 25 preview image

Loading page image...

IntroductionCongratulations! If you are reading this, you've likely passed the 1Z0-815 Programmer I exam, and you are now ready to start your journeythrough the 1Z0-816 (Java SE Programmer II) exam. Or perhaps youcame here from an older version of the certification and are nowtaking the IZ0-817 (Upgrade OCP Java 6, 7 & 8 to Java SE 11Developer) exam. In either case, this book will guide you on your pathto becoming a Java 11 Oracle Certified Professional.The Programmer II exam builds upon the Programmer I exam. Youare expected to know all of Programmer I material when taking thesecond exam. Some objectives on the 1Z0-816 exam are the same asthose on the 1Z0-815 exam, such as thefinalmodifier. Most areimplied. For example, the 1Z0-816 exam objectives don't mentionifstatements, loops, and constructors. Clearly, you still need to knowthese. We will also point out differences in Java 11 to help those of younew to Java 11.If you didn't score well on the 1Z0-815 exam or if it has been a whilesince you took it, we recommend reviewing the book you used to studyfor it. You really need to know the fundamentals well. If you'vemisplaced your study materials, feel free to check out our 1Z0-815book,OCP Oracle Certified Professional Java SE 11 Programmer IStudy Guide: Exam 1Z0-815(Sybex, 2019).In the introduction, we will cover important information about theexam before moving on to information about this book. Finally, thisintroduction ends with an assessment test so you can see how muchstudying lays ahead of you.Understanding the ExamAt the end of the day, the exam is a list of questions. The more youknow about the structure of the exam, the better you are likely to do.For example, knowing how many questions the exam contains allowsyou to manage your progress and time remaining better. In this

Page 26

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 26 preview image

Loading page image...

section, we discuss the details of the exam, along with some history ofprevious certification exams.Broader ObjectivesIn previous certification exams, the list of exam objectives tendedto include specific topics, classes, and APIs that you needed toknow for the exam. For example, take a look at an objective for the1Z0-809 (OCP 8) exam:Use BufferedReader, BufferedWriter, File, FileReader,FileWriter, FileInputStream, FileOutputStream,ObjectOutputStream, ObjectInputStream, and PrintWriter inthe java.io package.Now compare it with the equivalent objective for the 1Z0-816 (OCP11) exam:Use I/O Streams to read and write filesNotice the difference? The older version is more detailed anddescribes specific classes you will need to understand. The newerversion is a lot vaguer. It also gives the exam writers a lot morefreedom to insert a new feature, for example, without having toupdate the list of objectives.So how do you know what to study? By reading this study guide ofcourse! We've spent years studying the certification exams, in all oftheir forms, and have carefully cultivated topics, material, andpractice questions that we are confident can lead to successfullypassing the exam.Choosing Which Exam to TakeJava is now 25 years old, celebrating being “born” in 1995. As withanything 25 years old, there is a good amount of history and variationbetween different versions of Java. Over the years, the certificationexams have changed to cover different topics. The names of the exams

Page 27

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 27 preview image

Loading page image...

have even changed. This book covers the Java 11 exam.Those with more recent certifications might remember that Oraclereleased two exams each for Java 7 and Java 8. The first exam tendedto be easier, and completing it granted you the title of Oracle CertifiedAssociate (OCA). The second exam was a lot more difficult, with muchlonger questions, and completing it granted you the title of OracleCertified Professional (OCP).Oracle did not release an exam for Java 9 or Java 10, probably becauseneither of these is a Long Term Support (LTS) release. With Java 11,Oracle decided to discontinue both the OCA certification and itsassociated 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 fromcompleting the first exam.Figure I.1 shows these past and current Java certifications. This imageis helpful if you run into material online that references older exams. Itis also helpful if you have an older certification and are trying todetermine where it fits in.FIGURE I.1Past and current Java certificationsFigure I.2 shows the exams you need to take in order to earn the latestJava certification if you don't have any existing Java certifications. Ifyou haven't taken the 1Z0-815 exam yet, see ourOCP Oracle CertifiedProfessional Java SE 11 Programmer I Study Guide: Exam 1Z0-815(Sybex, 2019).

Page 28

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 28 preview image

Loading page image...

FIGURE I.2Latest Java certification examsIf you already hold a Java certification, you need to decide which examyou can take to earn the Java 11 OCP title. Besides the 1Z0-816Programmer II exam, there is also a 1Z0-817 Upgrade exam. Oraclehas defined a number of upgrade paths to achieve the OCP title, shownin Figure I.3.FIGURE I.3Exam prerequisitesIn a nutshell, you can take the 1Z0-816 exam if you passed the 1Z0-815

Page 29

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 29 preview image

Loading page image...

exam or hold the OCA 7 or 8 title. Oracle's goal here is to help peopleget to Java 11 OCP certification if they are halfway through the journeyto OCP certification.If you hold a recent OCP 6, 7, or 8 certification title (or even the olderSun Certified Programmer 6 title), then you can take the 1Z0-817 examto obtain the Java 11 OCP title with just one exam. Those with a Javacertification 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 or1Z0-817 exam will grant you the Java 11 OCP title. We recommendreviewing the objectives between the two exams and deciding whichone you feel more comfortable with.There are also two edge cases. Those who passed the OCA 6 exammust still take the 1Z0-815 exam. The OCA 6 exam covered far lessmaterial than the OCA 7 or 8.Additionally, those who passed the OCP 7 or 8 exam but neverreceived the OCP title because they didn't pass the OCA exam, need totake the 1Z0-815 exam. After that, you have a choice of the 1Z0-816exam or the 1Z0-817 exam.If you're not sure which exam you should take, you canpost questions onCodeRanch.com, and the community will be happyto help. You might even get a response from Scott or Jeanne!Taking the Upgrade ExamThe chapters of this book are structured for those taking the 1Z0-816Programmer II exam. As we said earlier, though, you can easily rely onthis book to prepare for the 1Z0-817 exam. If, after reading theprevious section, you decide to take the 1Z0-817 exam, then youshould be aware that the objectives between the two exams are not the

Page 30

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 30 preview image

Loading page image...

same.To help support those taking the 1Z0-817 exam, we include AppendixA, “The Upgrade Exam,” as part of this book. This appendix includesmaterial you would have learned when taking the 1Z0-815Programmer I exam that you will need to know for the 1Z0-817 exam.Because of this, you should actually read this appendix first. Forexample, you need to first know how to create a module before you cancreate a module service in Chapter 6, “Modular Applications.”While we think every chapter is worth reading, here are some chaptersyou 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 theentire chapter or select portions of the chapter. We've included amapping of all of the upgrade exam objectives and their associatedchapters in the “Reviewing Exam Objectives” section of thisintroduction.Changes to the ExamAt the time of this book being published, all OCP 11 certification examscontain 80 questions and have a duration of 3 hours. The 1Z0-816exam requires a passing score of 63 percent, while the 1Z0-817 examrequires a passing score of 61 percent.Oracle has a tendency to fiddle with the length of the exam and thepassing score once it comes out. Oracle also likes to “tweak” the examtopics over time. It wouldn't be a surprise for Oracle to make minorchanges to the exam objectives, the number of questions, or thepassing score after this book goes to print.If there are any changes to the exam after this book is published, wewill note them on the book page of our blog.

Page 31

Study Guide Exam 1Z0-816 and Exam 1Z0-817 (2020) - Page 31 preview image

Loading page image...

www.selikoff.net/ocp11-2Exam QuestionsThe exams consist entirely of multiple-choice questions. There arebetween four and seven possible answers. If a question has more thanone answer, the question specifically states exactly how many correctanswers there are. This book does not do that. We say “Choose all thatapply” to make the questions harder. This means the questions in thisbook are generally harder than those on the exam. The idea is to giveyou more practice so you can spot the correct answer more easily onthe real exam.If you read about older versions of the exam online, you might seereferences to drag-and-drop questions. These questions had you do apuzzle on how to complete a piece of code. Luckily, these are no longeron the exam.Many of the questions on the exam are code snippets rather than fullclasses. Saving space by not including imports and/or class definitionsleaves room for lots of other code. For example, it is common to comeacross 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 likegetName()andsetName(),as well as related constructors, exist. For example, we would expectthis code to compile:var name = new Zoo("Java Zoo").getName();Out-of-Scope MaterialWhen you take the exam, you may see some questions that appear tobe out of scope.Don't panic!Often, these questions do not requireknowing anything about the topic to answer the question. Forexample, after reading this book, you should be able to spot that thefollowing does not compile, even if you've never heard ofLocalDate
Preview Mode

This document has 996 pages. Sign in to access the full document!

Study Now!

XY-Copilot AI
Unlimited Access
Secure Payment
Instant Access
24/7 Support
Document Chat

Document Details

Related Documents

View all