OCA Java SE 8 Programmer I Exam Guide (Exams 1Z0-808)

Book description

Up-to-date coverage of every topic on the Java 8 SE Programmer I exam

Prepare for the OCA Java SE 8 Programmer I exam using this effective self-study system from Oracle Press. Written by developers of the original Sun Certified Java Programmer exam, OCA Java SE 8 Programmer I Exam Guide (Exam 1Z0-808) includes two complete, accurate practice exams. In all, you will get more than 200 practice questions that mirror those on the actual test in content, tone, and format. Beyond fully preparing you for the challenging exam, the book also serves as an ideal on-the-job reference.

Clearly explains every topic on Exam IZ0-808, including:
• Declarations
• Access control
• Object orientation
• Assignments
• Operators
• Flow control
• Exceptions
• Strings
• Arrays
• ArrayLists

CD ICON
Electronic content includes:
• 200+ practice exam questions
• Fully customizable test engine
• Secured book PDF

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Contents
  5. Acknowledgments
  6. Preface
  7. Introduction
  8. 1 Declarations and Access Control
    1. Java Refresher
    2. Features and Benefits of Java (OCA Objective 1.5)
    3. Identifiers and Keywords (OCA Objectives 1.2 and 2.1)
      1. Legal Identifiers
      2. Oracle’s Java Code Conventions
      3. Define Classes (OCA Objectives 1.2, 1.3, 1.4, 6.4, and 7.5)
        1. Source File Declaration Rules
        2. Using the javac and java Commands
        3. Using public static void main(String[ ] args)
        4. Import Statements and the Java API
        5. Static Import Statements
        6. Class Declarations and Modifiers
      4. Exercise 1-1: Creating an Abstract Superclass and Concrete Subclass
      5. Use Interfaces (OCA Objective 7.5)
        1. Declaring an Interface
        2. Declaring Interface Constants
        3. Declaring default Interface Methods
        4. Declaring static Interface Methods
      6. Declare Class Members (OCA Objectives 2.1, 2.2, 2.3, 4.1, 4.2, 6.2, 6.3, and 6.4)
        1. Access Modifiers
        2. Nonaccess Member Modifiers
        3. Constructor Declarations
        4. Variable Declarations
      7. Declare and Use enums (OCA Objective 1.2)
        1. Declaring enums
      8. Certification Summary
      9. Two-Minute Drill
      10. Q&A Self Test
      11. Self Test Answers
  9. 2 Object Orientation
    1. Encapsulation (OCA Objectives 6.1 and 6.5)
    2. Inheritance and Polymorphism (OCA Objectives 7.1 and 7.2)
      1. The Evolution of Inheritance
      2. IS-A and HAS-A Relationships
    3. Polymorphism (OCA Objective 7.2)
    4. Overriding/Overloading (OCA Objectives 6.1 and 7.2)
      1. Overridden Methods
      2. Overloaded Methods
    5. Casting (OCA Objectives 2.2 and 7.3)
    6. Implementing an Interface (OCA Objective 7.5)
      1. Java 8—Now with Multiple Inheritance!
    7. Legal Return Types (OCA Objectives 2.2 and 6.1)
      1. Return Type Declarations
      2. Returning a Value
    8. Constructors and Instantiation (OCA Objectives 6.3 and 7.4)
      1. Constructor Basics
      2. Constructor Chaining
      3. Rules for Constructors
      4. Determine Whether a Default Constructor Will Be Created
      5. Overloaded Constructors
    9. Initialization Blocks (OCA Objectives 1.2 and 6.3-ish)
    10. Statics (OCA Objective 6.2)
      1. Static Variables and Methods
    11. Certification Summary
    12. Two-Minute Drill
    13. Q&A Self Test
    14. Self Test Answers
  10. 3 Assignments
    1. Stack and Heap—Quick Review
    2. Literals, Assignments, and Variables (OCA Objectives 2.1, 2.2, and 2.3)
      1. Literal Values for All Primitive Types
      2. Assignment Operators
      3. Exercise 3-1: Casting Primitives
    3. Scope (OCA Objective 1.1)
      1. Variable Scope
    4. Variable Initialization (OCA Objectives 2.1, 4.1, and 4.2)
      1. Using a Variable or Array Element That Is Uninitialized and Unassigned
      2. Local (Stack, Automatic) Primitives and Objects
    5. Passing Variables into Methods (OCA Objective 6.6)
      1. Passing Object Reference Variables
      2. Does Java Use Pass-By-Value Semantics?
      3. Passing Primitive Variables
    6. Garbage Collection (OCA Objective 2.4)
      1. Overview of Memory Management and Garbage Collection
      2. Overview of Java’s Garbage Collector
      3. Writing Code That Explicitly Makes Objects Eligible for Collection
      4. Exercise 3-2: Garbage Collection Experiment
    7. Certification Summary
    8. Two-Minute Drill
    9. Q&A Self Test
    10. Self Test Answers
  11. 4 Operators
    1. Java Operators (OCA Objectives 3.1, 3.2, and 3.3)
      1. Assignment Operators
      2. Relational Operators
      3. instanceof Comparison
      4. Arithmetic Operators
      5. Conditional Operator
      6. Logical Operators
      7. Operator Precedence
    2. Certification Summary
    3. Two-Minute Drill
    4. Q&A Self Test
    5. Self Test Answers
  12. 5 Flow Control and Exceptions
    1. Using if and switch Statements (OCA Objectives 3.3 and 3.4)
      1. if-else Branching
      2. switch Statements
      3. Exercise 5-1: Creating a switch-case Statement
    2. Creating Loops Constructs (OCA Objectives 5.1, 5.2, 5.3, 5.4, and 5.5)
      1. Using while Loops
      2. Using do Loops
      3. Using for Loops
      4. Using break and continue
      5. Unlabeled Statements
      6. Labeled Statements
      7. Exercise 5-2: Creating a Labeled while Loop
    3. Handling Exceptions (OCA Objectives 8.1, 8.2, 8.3, 8.4, and 8.5)
      1. Catching an Exception Using try and catch
      2. Using finally
      3. Propagating Uncaught Exceptions
      4. Exercise 5-3: Propagating and Catching an Exception
      5. Defining Exceptions
      6. Exception Hierarchy
      7. Handling an Entire Class Hierarchy of Exceptions
      8. Exception Matching
      9. Exception Declaration and the Public Interface
      10. Exercise 5-4: Creating an Exception
      11. Rethrowing the Same Exception
    4. Common Exceptions and Errors (OCA Objective 8.5)
      1. Where Exceptions Come From
      2. JVM-Thrown Exceptions
      3. Programmatically Thrown Exceptions
      4. A Summary of the Exam’s Exceptions and Errors
    5. Certification Summary
    6. Two-Minute Drill
    7. Q&A Self Test
    8. Self Test Answers
  13. 6 Strings, Arrays, ArrayLists, Dates, and Lambdas
    1. Using String and StringBuilder (OCA Objectives 9.2 and 9.1)
      1. The String Class
      2. Important Facts About Strings and Memory
      3. Important Methods in the String Class
      4. The StringBuilder Class
      5. Important Methods in the StringBuilder Class
    2. Working with Calendar Data (OCA Objective 9.3)
      1. Immutability
      2. Factory Classes
      3. Using and Manipulating Dates and Times
      4. Formatting Dates and Times
    3. Using Arrays (OCA Objectives 4.1 and 4.2)
      1. Declaring an Array
      2. Constructing an Array
      3. Initializing an Array
    4. Using ArrayLists and Wrappers (OCA Objectives 9.4 and 2.5)
      1. When to Use ArrayLists
      2. ArrayList Methods in Action
      3. Important Methods in the ArrayList Class
      4. Autoboxing with ArrayLists
      5. The Java 7 “Diamond” Syntax
    5. Advanced Encapsulation (OCA Objective 6.5)
      1. Encapsulation for Reference Variables
    6. Using Simple Lambdas (OCA Objective 9.5)
    7. Certification Summary
    8. Two-Minute Drill
    9. Q&A Self Test
    10. Self Test Answers
  14. A About the Download
    1. System Requirements
    2. Downloading from McGraw-Hill Professional’s Media Center
      1. Installing the Practice Exam Software
      2. Running the Practice Exam Software
      3. Practice Exam Software Features
      4. Removing Installation
      5. Help
    3. Technical Support
      1. Windows 8 Troubleshooting
      2. McGraw-Hill Education Content Support
  15. Index

Product information

  • Title: OCA Java SE 8 Programmer I Exam Guide (Exams 1Z0-808)
  • Author(s): Kathy Sierra, Bert Bates
  • Release date: May 2017
  • Publisher(s): McGraw-Hill
  • ISBN: 9781260011388