You are previewing OCA Java SE 7 Programmer I Study Guide (Exam 1Z0-803).
O'Reilly logo
OCA Java SE 7 Programmer I Study Guide (Exam 1Z0-803)

Book Description

A Proven Study System for Oracle Certified Associate Exam 1Z0-803 - Prepare for the Oracle Certified Associate Java SE 7 Programmer I exam with help from this exclusive Oracle Press guide. In each chapter, you'll find challenging exercises, practice questions, a two-minute drill, and a chapter summary to highlight what you've learned. This authoritative guide will help you pass the test and will also serve as your essential on-the-job reference.

Table of Contents

  1. Cover 
  2. Copyright
  3. Dedication
  4. About the Authors
  5. Contents at a Glance
  6. Contents 
  7. Acknowledgments
  8. Preface
  9. Introduction
  10. 1 Packaging, Compiling, and Interpreting Java Code
    1. Understand Packages
      1. Package Design
      2. package and import Statements
      3. Exercise 1-1: Replacing Implicit import Statements with Explicit import Statements
    2. Understand Package-Derived Classes
      1. Java Utilities API
      2. Java Basic Input/Output API
      3. The Java Networking API
      4. Java Abstract Window Toolkit API
      5. Java Swing API
      6. Exercise I -2: Understanding Extended Functionality of the Java Utilities API
    3. Understand Class Structure
      1. Naming Conventions
      2. Separators and Other Java Source Symbols
      3. Java Class Structure
    4. Compile and Interpret Java Code
      1. Java Compiler
      2. Java Interpreter
      3. Exercise 1-3: Compiling and Interpreting Packaged Software
    5. Two-Minute Drill
    6. Q&A Self Test
      1. Self Test Answers
  11. 2 Programming with Java Statements
    1. Understand Assignment Statements
      1. The Assignment Expression Statement
    2. Create and Use Conditional Statements
      1. The if Conditional Statement
      2. The if-then Conditional Statement
      3. The if-then-else Conditional Statement
      4. The switch Conditional Statement
      5. Exercise 2-1: Evaluating the String Class in the switch Statement
    3. Create and Use Iteration Statements
      1. The for Loop Iteration Statement
      2. The Enhanced for Loop Iteration Statement
      3. Exercise 2-2: Iterating Through an ArrayList While Applying Conditions
      4. The while Iteration Statement
      5. The do-while Iteration Statement
      6. Exercise 2-3: Performing Code Refactoring
      7. Exercise 2-4: Knowing Your Statement-Related Keywords
    4. Create and Use Transfer of Control Statements
      1. The break Transfer of Control Statement
      2. The continue Transfer of Control Statement
      3. The return Transfer of Control Statement
      4. The labeled Statement
    5. Two-Minute Drill
    6. Q&A Self Test
      1. Self Test Answers
  12. 3 Programming with Java Operators and Strings
    1. Understand Fundamental Operators
      1. Assignment Operators
      2. Exercise 3-1: Using Compound Assignment Operators
      3. Arithmetic Operators
      4. Relational Operators
      5. Logical Operators
    2. Understand Operator Precedence
      1. Operator Precedence
      2. Overriding Operator Precedence
    3. Use String Objects and Their Methods
      1. Strings
      2. The String Concatenation Operator
      3. Exercise 3-2: Uncovering Bugs that Your Compiler May Not Find
      4. Methods of the String Class
    4. Use StringBuilder Objects and Their Methods
      1. Methods of the StringBuilder Class
      2. Exercise 3-3: Using Constructors of the StringBuilder Class
    5. Test Equality Between Strings and other Objects equals Method of the String Class
      1. Exercise 3-4: Working with the compare To Method of the String Class
    6. Two-Minute Drill
    7. Q&A Self Test
      1. Self Test Answers
  13. 4 Working with Basic Classes and Variables
    1. Understand Primitives, Enumerations, and Objects
      1. Primitive Variables
      2. Objects
      3. Exercise 4-1: Compile and Run an Object
      4. Arrays
      5. Enumerations
      6. Java Is Strongly Typed
      7. Naming Conventions
    2. Use Primitives, Enumerations, and Objects
      1. Literals
      2. Examples of Primitives, Enumerations, and Objects
      3. Exercise 4-2: Creating Getters and Setters.
    3. Two-Minute Drill
    4. Q&A Self Test
      1. Self Test Answers
  14. 5 Understanding Methods and Variable Scope
    1. Create and Use Methods
      1. Using Method Syntax
      2. Making and Calling a Method
      3. Overloading a Method
    2. Pass Objects by Reference and Value
      1. Passing Primitives by Value to Methods
      2. Passing Objects by Reference to Methods
    3. Understand Variable Scope
      1. Local Variables
      2. Method Parameters
      3. Instance Variables
      4. An Object’s Lifecycle
    4. Create and Use Constructors
      1. Making a Constructor
      2. Overloading a Constructor
      3. Using the Default Constructor
    5. Use this and super Keywords
      1. The this Keyword
      2. The super Keyword
    6. Create Static Methods and Instance Variables
      1. Static Methods
      2. Static Variables
      3. Constants
    7. Two-Minute Drill
    8. Q&A Self Test
      1. Self Test Answers
  15. 6 Programming with Arrays
    1. Work with Java Arrays
      1. One-Dimensional Arrays
      2. Multi-Dimensional Arrays
    2. Work with ArrayList Objects and Their Methods
      1. Using the ArrayList Class
      2. ArrayList vs. Standard Arrays
      3. Exercise 6-1: Implement an ArrayList and Standard Array
    3. Two-Minute Drill
    4. Q&A Self Test
      1. Self Test Answers
  16. 7 Understanding Class Inheritance
    1. Implement and Use Inheritance and Class Types
      1. Inheritance
      2. Overriding Methods
      3. Abstract Classes
      4. Interfaces
      5. Advanced Concepts of Inheritance
    2. Understand Encapsulation Principles
      1. Good Design with Encapsulation
      2. Access Modifiers
      3. Setters and Getters
    3. Advanced Use of Classes with Inheritance and Encapsulation
      1. Java Access Modifiers Example
      2. Inheritance with Concrete Classes Examples
      3. Inheritance with Abstract Classes Examples
      4. Exercise 7-1: Add Functionality to the Plant Simulator
      5. Interface Example
    4. Two-Minute Drill
    5. Q&A Self Test
      1. Self Test Answers
  17. 8 Understanding Polymorphism and Casts
    1. Understand Polymorphism
      1. Concepts of Polymorphism
      2. Practical Examples of Polymorphism
      3. Exercise 8-1: Add Functionality to the Describable Example
    2. Understand Casting
      1. When Casting Is Needed
    3. Two-Minute Drill
    4. Q&A Self Test
      1. Self Test Answers
  18. 9 Handling Exceptions
    1. Understand the Rationale and Types of Exceptions
      1. Exception Hierarchy in Java
      2. Checked Exceptions
      3. Unchecked Exceptions
      4. (Unchecked) Errors
      5. Exercise 9-1: Determining When to Use Assertions in Place of Exceptions
      6. Exercise 9-2: Analyzing the Source Code of Java Exceptions
    2. Understand the Nature of Exceptions
      1. Defining Exceptions
      2. Throwing Exceptions
      3. Propagating Exceptions
      4. Exercise 9-3: Creating a Custom Exception Class
    3. Alter the Program Flow
      1. The try-catch Statement
      2. The try-finally Statement
      3. The try-catch-finally Statement
      4. The try-with-resources Statement
      5. The multi-catch Clause
      6. Exercise 9-4: Using NetBeans Code Templates for Exception Handling Elements
    4. Recognize Common Exceptions
      1. Common Checked Exceptions
      2. Common Unchecked Exceptions
      3. Common Errors
      4. Exercise 9-5: Creating an Error Condition
    5. Two-Minute Drill
    6. Q&A Self Test
      1. Self Test Answers
  19. 10 Working with Classes and Their Relationships
    1. Understand Class Compositions and Associations
      1. Class Compositions and Associations
      2. Class Relationships
      3. Multiplicities
      4. Association Navigation
    2. Class Compositions and Associations in Practice
      1. Examples of Class Association Relationships
      2. Examples of Class Composition Relationships
      3. Examples of Association Navigation
    3. Two-Minute Drill
    4. Q&A Self Test
      1. Self Test Answers
  20. A Java Platforms
    1. Java Platform, Standard Edition
      1. The Java SE API
      2. The Java Runtime Environment
      3. The Java Development Kit
      4. Supported Operating Systems
    2. Java 2 Platform, Micro Edition
      1. Configurations
      2. Profiles
      3. Optional Packages
      4. Squawk
    3. Java Platform, Enterprise Edition
  21. B Java SE 7 Packages
    1. Core Packages
    2. Integration Packages
    3. User Interface Packages
    4. Security Packages
    5. XML-based Packages
  22. C Java Keywords
  23. D Bracket Conventions
    1. Java Bracket Conventions
    2. Miscellaneous Bracket Conventions
  24. E Unicode Standard
  25. F Pseudo-code Algorithms
    1. Implementing Statement-Related Algorithms from Pseudo-code
      1. Pseudo-code Algorithms
      2. Pseudo-code Algorithms and Java
  26. G Unified Modeling Language
    1. Recognizing Representations of Significant UML Elements
      1. Classes, Abstract Classes, and Interface Diagrams
      2. Attributes and Operations
      3. Visibility Modifiers
    2. Recognizing Representations of UML Associations
      1. Graphic Paths
      2. Relationship Specifiers
  27. H Practice Exam
    1. MasterExam Answers
  28. I About the Download
    1. Steps to Download MasterExam
      1. System Requirements
      2. MasterExam
    2. Enterprise Architect Project File
    3. Help
    4. Removing Installation
    5. Technical Support
      1. LearnKey Technical Support
  29. Glossary
  30. Index