OCAJP

Exam details

  • Name: Java SE 8 Programmer I
  • Code: 1Z0-808
  • Duration: 150 minutes
  • Number of Questions: 77
  • Format: Multiple choice
  • Pass rate: 65%
  • Price: $245 USD, $335 AUD

Find a test center here: Oracle Test Center

Topics

1. Java Basics

  1. Define the scope of variables
  2. Define the structure of a Java class
  3. Create executable Java applications with a main method; run a Java program from the command line; including console output.
  4. Import other Java packages to make them accessible in your code
  5. Compare and contrast the features and components of Java such as: platform independence, object orientation, encapsulation, etc.

2. Working With Java Data Types

  1. Declare and initialize variables (including casting of primitive data types)
  2. Differentiate between object reference variables and primitive variables
  3. Know how to read or write to object fields
  4. Explain an Object's Lifecycle (creation, "dereference by reassignment" and garbage collection)
  5. Develop code that uses wrapper classes such as Boolean, Double, and Integer.

3. Using Operators and Decision Constructs

  1. Use Java operators; including parentheses to override operator precedence
  2. Test equality between Strings and other objects using == and equals ()
  3. Create if and if/else and ternary constructs
  4. Use a switch statement

4. Creating and Using Arrays

  1. Declare, instantiate, initialize and use a one-dimensional array
  2. Declare, instantiate, initialize and use multi-dimensional array

5. Using Loop Constructs

  1. Create and use while loops
  2. Create and use for loops including the enhanced for loop
  3. Create and use do/while loops
  4. Compare loop constructs
  5. Use break and continue

6. Working with Methods and Encapsulation

  1. Create methods with arguments and return values; including overloaded methods
  2. Apply the static keyword to methods and fields
  3. Create and overload constructors; including impact on default constructors
  4. Apply access modifiers
  5. Apply encapsulation principles to a class
  6. Determine the effect upon object references and primitive values when they are passed into methods that change the values

7. Working with Inheritance

  1. Describe inheritance and its benefits
  2. Develop code that demonstrates the use of polymorphism; including overriding and object type versus reference type
  3. Determine when casting is necessary
  4. Use super and this to access objects and constructors
  5. Use abstract classes and interfaces

8. Handling Exceptions

  1. Differentiate among checked exceptions, unchecked exceptions, and Errors
  2. Create a try-catch block and determine how exceptions alter normal program flow
  3. Describe the advantages of Exception handling
  4. Create and invoke a method that throws an exception
  5. Recognize common exception classes (such as NullPointerException, ArithmeticExcpetion, ArrayIndexOutOfBoundsException, ClassCastException)

9. Working with Selected classes from the Java API

  1. Manipulate data using the StringBuilder class and its methods
  2. Creating and manipulating Strings
  3. Create and manipulate calendar data using classes from java.time.LocalDateTime, java.time.LocalDate, java.time.LocalTime, java.time.format.DateTimeFormatter, java.time.Period
  4. Declare and use an ArrayList of a given type
  5. Write a simple Lambda expression that consumes a Lambda Predicate expression

Assumptions for the exam

  • Missing package and import statements: If sample code do not include package or import statements, and the question does not explicitly refer to these missing statements, then assume that all sample code is in the same package, and import statements exist to support them.
  • No file or directory path names for classes: If a question does not state the file names or directory locations of classes, then assume one of the following, whichever will enable the code to compile and run:
    • All classes are in one file
    • Each class is contained in a separate file, and all files are in one directory
  • Unintended line breaks: Sample code might have unintended line breaks. If you see a line of code that looks like it has wrapped, and this creates a situation where the wrapping is significant (for example, a quoted String literal has wrapped), assume that the wrapping is an extension of the same line, and the line does not contain a hard carriage return that would cause a compilation failure.
  • Code fragments: A code fragment is a small section of source code that is presented without its context. Assume that all necessary supporting code exists is present and that the supporting environment fully supports the correct compilation and execution of the code shown and its omitted environment.
  • Descriptive comments: Take descriptive comments, such as "setter and getters go here," at face value. Assume that correct code exists, compiles, and runs successfully to create the described effect.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License