Guide: Using our OCP 21 Book for the Foundations Exam

The Java Foundations Exam 1Z0-811 currently targets Java 8. As such you are better off buying our OCA 8 book and using this page to see what parts of the book to read and a few blog posts as supplemental reading.

If you already purchased our Java 21, you can still use it for Foundations Exam. You just don’t need to read the entire book! With that in mind, the following table helps you know what you need to study for those using our OCP 21 book for the Foundations Exam.

ObjectiveTopicHow to Study
1.1Describe the features of JavaBe able to explain the following benefits: object oriented, encapsulation, platform independent, robust, simple, secure, backward compatible.
1.2Describe the real-world applications of JavaBlog post on real world applications of Java
2.1Describe the Java Development Kit (JDK) and the Java Runtime Environment (JRE)There’s not much to this.
The javac command is used to turn .java (source) files into .class (bytecode files). The javac command is part of the JDK.
The java command is used to run .class files. It is part of the JRE.
The JDK contains the JRE along with debugging tools and more
2.2Describe the components of object-oriented programmingRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
2.3Describe the components of a basic Java programRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
2.4Compile and execute a Java programRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
3.1Identify the conventions to be followed in a Java programRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
3.2Use Java reserved wordsRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
3.3Use single-line and multi-line comments in Java programsRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
3.4Import other Java packages to make them accessible in your codeRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
3.5Describe the java.lang packageRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
4.1Declare and initialize variables including a  variable using finalRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
4.2Cast a value from one data type to another including automatic and manual promotionRead all of chapter 2. This will cover a number of objectives including this one.
4.3Declare and initialize a String variableRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
5.1Use basic arithmetic operators to manipulate data including +, -, *, /, and %Read all of chapter 2. This will cover a number of objectives including this one.
5.2Use the increment and decrement operatorsRead all of chapter 2. This will cover a number of objectives including this one.
5.3Use relational operators including ==, !=, >, >=, <, and <=Read all of chapter 2. This will cover a number of objectives including this one.
5.4Use arithmetic assignment operatorsRead all of chapter 2. This will cover a number of objectives including this one.
5.5Use conditional operators including &&, ||, and ?Read all of chapter 2. This will cover a number of objectives including this one.
5.6Describe the operator precedence and use of parenthesisRead all of chapter 2. This will cover a number of objectives including this one.
6.1Develop code that uses methods from the String classRead ch 4’s Creating and Manipulation Strings section
6.2Format Strings using escape sequences including %d, %n, and %sThis is covered in ch 4’s Formatting Values section. It is also covered at Blog post on formatting Strings
7.1Use the Random classRead ch 5’s Calculating with Math APIs or Blog post on Random and Math
7.2Use the Math classRead ch 5’s Calculating with Math APIs or Blog post on Random and Math
8.1Use the decision making statement  (if-then and if-then-else)Read Chapter 3’s Creating Decision Making Statements section, skipping pattern matching and flow control.
8.2Use the switch statementRead Chapter 3’s Building Switch Expressions and Statements section skipping everything that has a return value, -> or yield in it.
8.3Compare how == differs between primitives and objectsRead Chapter 4’s Checking for Equality and Understanding Equality sections
8.4Compare two String objects by using the compareTo and equals methodsBlog post on compareTo
9.1Describe looping statementsRead Chapter 3’s Writing while loops and Constructing for loops sections
9.2Use a for loop including an enhanced for loopRead Chapter 3’s Constructing for loops section
9.3Use a while loopRead Chapter 3’s Writing while loops section
9.4Use a do- while loopRead Chapter 3’s Writing while loops section
9.5Compare and contrast the for, while, and do-while loopsRead Chapter 3’s Writing while loops and Constructing for loops sections
9.6Develop code that uses break and continue statementsRead Chapter 3’s Controlling Flow with Branching section
10.1Identify syntax and logic errorsThis is covered as you read about other topics.
10.2Use exception handlingChapter 11’s Understanding Exceptions section
10.3Handle common exceptions thrownChapter 11’s Recognizing Exception Classes section
10.4Use try and catch blocksChapter 11’s Using try and catch blocks section
11.1Use a one-dimensional arrayRead chapter 4’s Understanding Arrays section skipping comparing, mismatch and multi dimensional arrays
11.2Create and manipulate an ArrayListRead chapter 9’s Using the List interface
11.3Traverse the elements of an ArrayList by using iterators and loops including the enhanced for loopBlog post on iterators
11.4Compare an array and an ArrayListRead chapter 9’s Using the List interface section.
12.1Create a new class including a main methodRead chapter 6’s Creating classes section.
12.2Use the private modifierRead chapter 6’s Creating classes section.
12.3Describe the relationship between an object and its membersRead chapter 6’s Initializing Objects section.
12.4Describe the difference between a class variable, an instance variable, and a local variableRead all of chapter 1 except for var, text blocks, and destroying objects. This will cover a number of objectives including this one.
12.5Develop code that creates an object’s default constructor and modifies the object’s fieldsRead chapter 6’s Declaring constructors section
12.6Use constructors with and without parametersRead chapter 6’s Declaring constructors section
12.7Develop code that overloads constructorsRead chapter 6’s Declaring constructors section
13.1Describe and create a methodRead chapter 5’s Designing methods section
13.2Create and use accessor and mutator methodsAccessor methods begin with is or get and return a value. Mutator methods begin with set and store a value.
13.3Create overloaded methodsRead chapter 5’s Overloading methods section.
13.4Describe a static method and demonstrate its use within a programRead chapter 5’s Accessing static data section