You are previewing OCP Oracle® Certified Professional Java® SE 8 Programmer II.
O'Reilly logo
OCP Oracle® Certified Professional Java® SE 8 Programmer II

Book Description

Complete, trusted preparation for the Java Programmer II exam

OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide is your comprehensive companion for preparing for Exam 1Z0-809 as well as upgrade Exam 1Z0-810 and Exam 1Z0-813. With full coverage of 100% of exam objectives, this invaluable guide reinforces what you know, teaches you what you don't know, and gives you the hands-on practice you need to boost your skills. Written by expert Java developers, this book goes beyond mere exam prep with the insight, explanations and perspectives that come from years of experience. You'll review the basics of object-oriented programming, understand functional programming, apply your knowledge to database work, and much more. From the basic to the advanced, this guide walks you through everything you need to know to confidently take the OCP 1Z0-809 Exam and upgrade exams 1Z0-810 and 1Z0-813.

Java 8 represents the biggest changes to the language to date, and the latest exam now requires that you demonstrate functional programming competence in order to pass. This guide has you covered, with clear explanations and expert advice.

  • Understand abstract classes, interfaces, and class design

  • Learn object-oriented design principles and patterns

  • Delve into functional programming, advanced strings, and localization

  • Master IO, NIO, and JDBC with expert-led database practice

  • If you're ready to take the next step in your IT career, OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide is your ideal companion on the road to certification.

    Table of Contents

    1. Introduction
      1. The OCP Exam
      2. Scheduling the Exam
      3. The Day of the Exam
      4. Finding Out Your Score
      5. Exam Questions
      6. Getting Started
      7. Getting Help
      8. Who Should Buy This Book
      9. How This Book Is Organized
      10. Conventions Used in This Book
      11. OCP Exam Objectives
    2. Assessment Test
      1. Answers to Assessment Test
    3. Chapter 1 Advanced Class Design
      1. Reviewing OCA Concepts
      2. Using <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">instanceof</i>
      3. Understanding Virtual Method Invocation
      4. Annotating Overridden Methods
      5. Coding <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">equals</i>, , <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">hashCode</i>, and , and <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">toString</i>
      6. Working with <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">Enum</i>ss
      7. Creating Nested Classes
      8. Summary
      9. Exam Essentials
      10. Review Questions
    4. Chapter 2 Design Patterns and Principles
      1. Designing an Interface
      2. Introducing Functional Programming
      3. Implementing Polymorphism
      4. Understanding Design Principles
      5. Working with Design Patterns
      6. Summary
      7. Exam Essentials
      8. Review Questions
    5. Chapter 3 Generics and Collections
      1. Reviewing OCA Collections
      2. Working with Generics
      3. Using Lists, Sets, Maps, and Queues
      4. <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">Comparator</i> vs. vs. <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">Comparable</i>
      5. Searching and Sorting
      6. Additions in Java 8
      7. Summary
      8. Exam Essentials
      9. Review Questions
    6. Chapter 4 Functional Programming
      1. Using Variables in Lambdas
      2. Working with Built-In Functional Interfaces
      3. Returning an <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">Optional</i>
      4. Using Streams
      5. Working with Primitives
      6. Working with Advanced Stream Pipeline Concepts
      7. Summary
      8. Exam Essentials
      9. Review Questions
    7. Chapter 5 Dates, Strings, and Localization
      1. Working with Dates and Times
      2. Reviewing the <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">String</i> class class
      3. Adding Internationalization and Localization
      4. Summary
      5. Exam Essentials
      6. Review Questions
    8. Chapter 6 Exceptions and Assertions
      1. Reviewing Exceptions
      2. Creating Custom Exceptions
      3. Using Multi-catch
      4. Using Try-With-Resources
      5. Rethrowing Exceptions
      6. Working with Assertions
      7. Summary
      8. Exam Essentials
      9. Review Questions
    9. Chapter 7 Concurrency
      1. Introducing Threads
      2. Creating Threads with the <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">ExecutorService</i>
      3. Synchronizing Data Access
      4. Using Concurrent Collections
      5. Working with Parallel Streams
      6. Managing Concurrent Processes
      7. Identifying Threading Problems
      8. Summary
      9. Exam Essentials
      10. Review Questions
    10. Chapter 8 IO
      1. Understanding Files and Directories
      2. Introducing Streams
      3. Working with Streams
      4. Interacting with Users
      5. Summary
      6. Exam Essentials
      7. Review Questions
    11. Chapter 9 NIO.2
      1. Introducing NIO.2
      2. Interacting with Paths and Files
      3. Understanding File Attributes
      4. Presenting the New Stream Methods
      5. Comparing Legacy <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">File</i> and NIO.2 Methods and NIO.2 Methods
      6. Summary
      7. Exam Essentials
      8. Review Questions
    12. Chapter 10 JDBC
      1. Introducing Relational Databases and SQL
      2. Introducing the Interfaces of JDBC
      3. Connecting to a Database
      4. Obtaining a <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">Statement</i>
      5. Executing a <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">Statement</i>
      6. Getting Data from a <i xmlns="" xmlns:epub="" xmlns:m="" xmlns:svg="">ResultSet</i>
      7. Closing Database Resources
      8. Dealing with Exceptions
      9. Summary
      10. Exam Essentials
      11. Review Questions
    13. Appendix A Answers to Review Questions
      1. Chapter 1: Advanced Class Design
      2. Chapter 2: Design Patterns and Principles
      3. Chapter 3: Generics and Collections
      4. Chapter 4: Functional Programming
      5. Chapter 5: Dates, Strings, and Localization
      6. Chapter 6: Exceptions and Assertions
      7. Chapter 7: Concurrency
      8. Chapter 8: IO
      9. Chapter 9: NIO.2
      10. Chapter 10: JDBC
    14. Appendix B Study Tips
      1. Studying for the Test
      2. Taking the Test
    15. Appendix C Upgrading from Java 6 or Earlier
      1. Enhancing the Java Language
      2. Formatting and Parsing
      3. Applying Locks
      4. Working with Directories
      5. Summary
      6. Exam Essentials
      7. Review Questions
      8. Answers to Review Questions
    16. Advert
    17. EULA