
OCP
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Persons
Content
- Cover
- Title Page
- Copyright
- Acknowledgments
- About the Authors
- Contents at a Glance
- Contents
- Introduction
- Assessment Test
- Answers to Assessment Test
- Chapter 1 Advanced Class Design
- Reviewing OCA Concepts
- Access Modifiers
- Overloading and Overriding
- Abstract Classes
- Static and Final
- Imports
- Using instanceof
- Understanding Virtual Method Invocation
- Annotating Overridden Methods
- Coding equals, hashCode, and toString
- toString
- equals
- hashCode
- Working with Enums
- Using Enums in Switch Statements
- Adding Constructors, Fields, and Methods
- Creating Nested Classes
- Member Inner Classes
- Local Inner Classes
- Anonymous Inner Classes
- Static Nested Classes
- Summary
- Exam Essentials
- Review Questions
- Chapter 2 Design Patterns and Principles
- Designing an Interface
- Purpose of an Interface
- Introducing Functional Programming
- Defining a Functional Interface
- Implementing Functional Interfaces with Lambdas
- Applying the Predicate Interface
- Implementing Polymorphism
- Distinguishing between an Object and a Reference
- Casting Object References
- Understanding Design Principles
- Encapsulating Data
- Creating JavaBeans
- Applying the Is-a Relationship
- Applying the Has-a Relationship
- Composing Objects
- Working with Design Patterns
- Applying the Singleton Pattern
- Creating Immutable Objects
- Using the Builder Pattern
- Creating Objects with the Factory Pattern
- Summary
- Exam Essentials
- Review Questions
- Chapter 3 Generics and Collections
- Reviewing OCA Collections
- Array and ArrayList
- Searching and Sorting
- Wrapper Classes and Autoboxing
- The Diamond Operator
- Working with Generics
- Generic Classes
- Generic Interfaces
- Generic Methods
- Interacting with Legacy Code
- Bounds
- Putting It All Together
- Using Lists, Sets, Maps, and Queues
- Common Collections Methods
- Using the List Interface
- Using the Set Interface
- Using the Queue Interface
- Map
- Comparing Collection Types
- Comparator vs. Comparable
- Comparable
- Comparator
- Searching and Sorting
- Additions in Java 8
- Using Method References
- Removing Conditionally
- Updating All Elements
- Looping through a Collection
- Using New Java 8 Map APIs
- Summary
- Exam Essentials
- Review Questions
- Chapter 4 Functional Programming
- Using Variables in Lambdas
- Working with Built-In Functional Interfaces
- Implementing Supplier
- Implementing Consumer and BiConsumer
- Implementing Predicate and BiPredicate
- Implementing Function and BiFunction
- Implementing UnaryOperator and BinaryOperator
- Checking Functional Interfaces
- Returning an Optional
- Using Streams
- Creating Stream Sources
- Using Common Terminal Operations
- Using Common Intermediate Operations
- Putting Together the Pipeline
- Printing a Stream
- Working with Primitives
- Creating Primitive Streams
- Using Optional with Primitive Streams
- Summarizing Statistics
- Learning the Functional Interfaces for Primitives
- Working with Advanced Stream Pipeline Concepts
- Linking Streams to the Underlying Data
- Chaining Optionals
- Collecting Results
- Summary
- Exam Essentials
- Review Questions
- Chapter 5 Dates, Strings, and Localization
- Working with Dates and Times
- Creating Dates and Times
- Manipulating Dates and Times
- Working with Periods
- Working with Durations
- Accounting for Daylight Savings Time
- Reviewing the String class
- Adding Internationalization and Localization
- Picking a Locale
- Using a Resource Bundle
- Formatting Numbers
- Formatting Dates and Times
- Summary
- Exam Essentials
- Review Questions
- Chapter 6 Exceptions and Assertions
- Reviewing Exceptions
- Exceptions Terminology
- Categories of Exceptions
- Exceptions on the OCP
- Try Statement
- Throw vs. Throws
- Creating Custom Exceptions
- Using Multi-catch
- Using Try-With-Resources
- Try-With-Resources Basics
- AutoCloseable
- Suppressed Exceptions
- Putting It Together
- Rethrowing Exceptions
- Working with Assertions
- The assert Statement
- Enabling Assertions
- Using Assertions
- Summary
- Exam Essentials
- Review Questions
- Chapter 7 Concurrency
- Introducing Threads
- Distinguishing Thread Types
- Understanding Thread Concurrency
- Introducing Runnable
- Creating a Thread
- Polling with Sleep
- Creating Threads with the ExecutorService
- Introducing the Single-Thread Executor
- Shutting Down a Thread Executor
- Submitting Tasks
- Waiting for Results
- Scheduling Tasks
- Increasing Concurrency with Pools
- Synchronizing Data Access
- Protecting Data with Atomic Classes
- Improving Access with Synchronized Blocks
- Synchronizing Methods
- Understanding the Cost of Synchronization
- Using Concurrent Collections
- Introducing Concurrent Collections
- Understanding Memory Consistency Errors
- Working with Concurrent Classes
- Obtaining Synchronized Collections
- Working with Parallel Streams
- Creating Parallel Streams
- Processing Tasks in Parallel
- Processing Parallel Reductions
- Managing Concurrent Processes
- Creating a CyclicBarrier
- Applying the Fork/Join Framework
- Identifying Threading Problems
- Understanding Liveness
- Managing Race Conditions
- Summary
- Exam Essentials
- Review Questions
- Chapter 8 IO
- Understanding Files and Directories
- Conceptualizing the File System
- Introducing the File Class
- Introducing Streams
- Stream Fundamentals
- Stream Nomenclature
- Common Stream Operations
- Working with Streams
- The FileInputStream and FileOutputStream Classes
- The FileReader and FileWriter classes
- The ObjectInputStream and ObjectOutputStream Classes
- The PrintStream and PrintWriter Classes
- Review of Stream Classes
- Interacting with Users
- The Old Way
- The New Way
- Summary
- Exam Essentials
- Review Questions
- Chapter 9 NIO.2
- Introducing NIO.2
- Introducing Path
- Creating Paths
- Interacting with Paths and Files
- Providing Optional Arguments
- Using Path Objects
- Interacting with Files
- Understanding File Attributes
- Discovering Basic File Attributes
- Improving Access with Views
- Presenting the New Stream Methods
- Conceptualizing Directory Walking
- Walking a Directory
- Searching a Directory
- Listing Directory Contents
- Printing File Contents
- Comparing Legacy File and NIO.2 Methods
- Summary
- Exam Essentials
- Review Questions
- Chapter 10 JDBC
- Introducing Relational Databases and SQL
- Identifying the Structure of a Relational Database
- Writing Basic SQL Statements
- Introducing the Interfaces of JDBC
- Connecting to a Database
- Building a JDBC URL
- Getting a Database Connection
- Obtaining a Statement
- Choosing a ResultSet Type
- Choosing a ResultSet Concurrency Mode
- Executing a Statement
- Getting Data from a ResultSet
- Reading a ResultSet
- Getting Data for a Column
- Scrolling ResultSet
- Closing Database Resources
- Dealing with Exceptions
- Summary
- Exam Essentials
- Review Questions
- Appendix A Answers to Review Questions
- Chapter 1: Advanced Class Design
- Chapter 2: Design Patterns and Principles
- Chapter 3: Generics and Collections
- Chapter 4: Functional Programming
- Chapter 5: Dates, Strings, and Localization
- Chapter 6: Exceptions and Assertions
- Chapter 7: Concurrency
- Chapter 8: IO
- Chapter 9: NIO.2
- Chapter 10: JDBC
- Appendix B Study Tips
- Studying for the Test
- Creating a Study Plan
- Comparing Previous Exams
- Creating and Running Sample Applications
- Taking the Test
- Understanding the Question
- Taking Advantage of the Exam Software
- Using the Provided Writing Material
- Choosing the Best Answer
- Optimizing Your Time
- Getting a Good Night's Rest
- Appendix C Upgrading from Java 6 or Earlier
- Enhancing the Java Language
- Using the Diamond Operator
- Creating Literals
- Making Decisions with Switch
- Formatting and Parsing
- Using DecimalFormat Flags
- Using DateFormat
- Formatting
- Parsing
- Custom Date Formats
- Applying Locks
- Understanding the Lock Framework
- Using a ReentrantLock
- Understanding Read/Write Locks
- Using a ReentrantReadWriteLock
- Working with Directories
- Traversing Directories
- Monitoring a Directory for Changes
- Summary
- Exam Essentials
- Review Questions
- Answers to Practice Test
- Index
- Advert
- EULA
System requirements
File format: PDF
Copy-Protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (only limited: Kindle).
The file format PDF always displays a book page identically on any hardware. This makes PDF suitable for complex layouts such as those used in textbooks and reference books (images, tables, columns, footnotes). Unfortunately, on the small screens of e-readers or smartphones, PDFs are rather annoying, requiring too much scrolling.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our eBook Help page.