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.
By:
J Boyarsky,
Scott Selikoff
Imprint: Sybex Inc.,U.S.
Country of Publication: United States
Dimensions:
Height: 232mm,
Width: 189mm,
Spine: 37mm
Weight: 786g
ISBN: 9781119067900
ISBN 10: 1119067901
Pages: 720
Publication Date: 04 December 2015
Audience:
Professional and scholarly
,
Undergraduate
Format: Paperback
Publisher's Status: Active
Introduction xix Assessment Test xxxviii Chapter 1 Advanced Class Design 1 Reviewing OCA Concepts 2 Using instanceof 7 Understanding Virtual Method Invocation 9 Annotating Overridden Methods 11 Coding equals, hashCode, and toString 13 Working with Enums 20 Creating Nested Classes 24 Summary 33 Exam Essentials 34 Review Questions 36 Chapter 2 Design Patterns and Principles 47 Designing an Interface 48 Introducing Functional Programming 52 Implementing Polymorphism 61 Understanding Design Principles 66 Working with Design Patterns 75 Summary 93 Exam Essentials 93 Review Questions 95 Chapter 3 Generics and Collections 103 Reviewing OCA Collections 104 Working with Generics 108 Using Lists, Sets, Maps, and Queues 124 Comparator vs. Comparable 143 Searching and Sorting 150 Additions in Java 8 152 Summary 159 Exam Essentials 161 Review Questions 162 Chapter 4 Functional Programming 171 Using Variables in Lambdas 172 Working with Built-In Functional Interfaces 173 Returning an Optional 182 Using Streams 185 Working with Primitives 205 Working with Advanced Stream Pipeline Concepts 213 Summary 223 Exam Essentials 224 Review Questions 226 Chapter 5 Dates, Strings, and Localization 233 Working with Dates and Times 234 Reviewing the String class 253 Adding Internationalization and Localization 255 Summary 273 Exam Essentials 274 Review Questions 276 Chapter 6 Exceptions and Assertions 283 Reviewing Exceptions 284 Creating Custom Exceptions 289 Using Multi-catch 291 Using Try-With-Resources 296 Rethrowing Exceptions 305 Working with Assertions 308 Summary 314 Exam Essentials 315 Review Questions 316 Chapter 7 Concurrency 325 Introducing Threads 327 Creating Threads with the ExecutorService 335 Synchronizing Data Access 350 Using Concurrent Collections 358 Working with Parallel Streams 366 Managing Concurrent Processes 377 Identifying Threading Problems 387 Summary 392 Exam Essentials 393 Review Questions 394 Chapter 8 IO 405 Understanding Files and Directories 406 Introducing Streams 411 Working with Streams 420 Interacting with Users 437 Summary 442 Exam Essentials 443 Review Questions 445 Chapter 9 NIO.2 453 Introducing NIO.2 454 Interacting with Paths and Files 460 Understanding File Attributes 478 Presenting the New Stream Methods 487 Comparing Legacy File and NIO.2 Methods 494 Summary 495 Exam Essentials 495 Review Questions 497 Chapter 10 JDBC 505 Introducing Relational Databases and SQL 507 Introducing the Interfaces of JDBC 511 Connecting to a Database 513 Obtaining a Statement 518 Executing a Statement 520 Getting Data from a ResultSet 524 Closing Database Resources 533 Dealing with Exceptions 535 Summary 536 Exam Essentials 537 Review Questions 539 Appendix A Answers to Review Questions 547 Chapter 1: Advanced Class Design 548 Chapter 2: Design Patterns and Principles 550 Chapter 3: Generics and Collections 553 Chapter 4: Functional Programming 556 Chapter 5: Dates, Strings, and Localization 558 Chapter 6: Exceptions and Assertions 560 Chapter 7: Concurrency 561 Chapter 8: IO 565 Chapter 9: NIO.2 568 Chapter 10: JDBC 571 Appendix B Study Tips 575 Studying for the Test 576 Taking the Test 582 Appendix C Upgrading from Java 6 or Earlier 595 Enhancing the Java Language 596 Formatting and Parsing 603 Applying Locks 607 Understanding the Lock Framework 607 Using a ReentrantLock 610 Understanding Read/Write Locks 614 Using a ReentrantReadWriteLock 615 Working with Directories 617 Summary 633 Exam Essentials 633 Review Questions 635 Answers to Practice Test 645 Index 649
Jeanne Boyarsky, OCA/OCP 8, has worked as a Java developer for a bank in NYC for 13 years where she develops, mentors and conducts training. In her free time, she is a senior moderator at CodeRanch and works on the forum code base. Scott Selikoff, OCA/OCP 8, has been a professional Java Enterprise developer for over 15 years. He currently operates Selikoff Solutions, LLC, which provides software consulting services to businesses in the tri-state New York City area.