Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Studying from an older book? Here's what you need to know. Also see OCPJP7andOCPJP8 and Ocajp7vsOcajp8

The big difference is that Oracle split the old SCJP/OCJP exam into two parts and added a bunch of topics. This page shows the topic mapping,

OCAJP 7 ObjectiveOCAJP 7 TextOCJP 6 Objective
Java Basics
1.1Define the scope of variables1.4
1.2Define the structure of a Java class1.1
1.3Create executable Java applications with a main methodimplied 7.2
1.4Import other Java packages to make them accessible in your code1.1
Working With Java Data Types
2.1Declare and initialize variables1.4
2.2Differentiate between object reference variables and primitive variables1.4
2.3Read or write to object fields1.4
2.4Explain an Object's Lifecycle (creation, "dereference" and garbage collection)7.4
2.5Call methods on objectsimplied
2.6Manipulate data using the StringBuilder class and its methods3.1
2.7Creating and manipulating Strings3.1
Using Operators and Decision Constructs �
3.1Use Java operators7.6
3.2Use parenthesis to override operator precedence7.6
3.3Test equality between Strings and other objects using == and equals ()7.6
3.4Create if and if/else constructs2.1
3.5Use a switch statement2.1
Creating and Using Arrays
4.1Declare, instantiate, initialize and use a one-dimensional array1.4
4.2Declare, instantiate, initialize and use multi-dimensional array1.4
4.3Declare and use an ArrayList6.3
Using Loop Constructs
5.1Create and use while loops2.2
5.2Create and use for loops including the enhanced for loop2.2
5.3Create and use do/while loops2.2
5.4Compare loop constructs2.2
5.5Use break and continue �2.2
Working with Methods and Encapsulation
6.1Create methods with arguments and return valuesimplied in 1.1?
6.2Apply the static keyword� to methods and fields �1.4
6.3Create an overloaded method1.5
6.4Differentiate between default and user defined constructors1.6
6.5Create and overload constructors1.6
6.6Apply access modifiers7.1
6.7Apply encapsulation principles to a class5.1
6.8Determine the effect upon object references and primitive values when they are passed� into methods that change the values7.3
Working with Inheritance
7.1Implement inheritance1.2, 1.3
7.2Develop code that demonstrates the use of polymorphism5.2
7.3Differentiate between the type of a reference and the type of an object1.2, 1.3
7.4Determine when casting is necessary1.2, 1.3
7.5Use super and this to access objects and constructors1.2, 1.3
7.6Use abstract classes and interfaces1.2, 1.3
Handling Exceptions
8.1Differentiate among checked exceptions, RuntimeExceptions and Errors2.5
8.2Create a try-catch block and determine how exceptions alter normal program flow2.4
8.3Describe what Exceptions are used for in Java2.5
8.4Invoke a method that throws an exception2.4
8.5Recognize common exception classes and categories2.6

OCPJP 7 ObjectiveOCPJP 7 TextOCJP 6 Objective
Java Class Design
1.1Use access modifiers: private, protected, and public7.1
1.2Override methods5.3, 5.4
1.3Overload constructors and other methods appropriately5.3, 5.4
1.4Use the instanceof operator and casting5.2, 7.6
1.5Use virtual method invocationnew
1.6Override methods from the Object class to improve the functionality of your class6.2
1.7Use package and import statements7.1
Advanced Class Design
2.1Identify when and how to apply abstract classes1.3
2.2Construct abstract Java classes and subclasses1.3
2.3Use the static and final keywords1.4?
2.4Create top-level and nested classes1.1
2.5Use enumerated types1.4
Object-Oriented Design Principles
3.1Write code that declares, implements and/or extends interfaces1.2
3.2Choose between interface inheritance and class inheritance5.1?
3.3Develop code that implements "is-a" and/or "has-a" relationships5.5
3.4Apply object composition principles5.1 and new
3.5Design a class using the Singleton design patternnew
3.6Write code to implement the DAO patternnew
3.7Design and create objects using a factory, and use factories from the APInew
Generics and Collections
4.1Create a generic class6.4
4.2Use the diamond syntax to create a collectionnew
4.3Analyze the interoperability of collections that use raw type and generic types6.3
4.4Use wrapper classes and autoboxing3.1
4.5Create and use a List, a Set and a Deque6.1, 6.3
4.6Create and use a Map6.1, 6.3
4.7Use java.util.Comparator and java.lang.Comparable6.5
4.8Sort and search arrays and lists6.5
String Processing
5.1Search, parse and build strings3.1
5.2Search, parse, and replace strings by using regular expressions, using expression patterns for matching limited to: . (dot), * (star), + (plus), ?, \d, \D, \s, \S, \w, \W, \b. \B, [], ().3.4
5.3Format strings using the formatting parameters: %b, %c, %d, %f, and %s in format strings.3.4
Exceptions and Assertions
6.1Use throw and throws statements2.5
6.2Use the try statement with multi-catch, and finally clausesnew
6.3Autoclose resources with a try-with-resources statementnew
6.4Create custom exceptionsnew
6.5Test invariants by using assertions102
Java I/O Fundamentals
7.1Read and write data from the console3.2
7.2Use streams to read and write files3.2
Java File I/O (NIO.2)
8.1Use the Path class to operate on file and directory pathsnew
8.2Use the Files class to check, delete, copy, or move a file or directorynew
8.3Read and change file and directory attributesnew
8.4Recursively access a directory treenew
8.5Find a file by using the PathMatcher classnew
8.6Watch a directory for changes by using WatchServicenew
Building Database Applications with JDBC
9.1Define the layout of the JDBC APInew
9.2Connect to a database by using a JDBC drivernew
9.3Update and query a databasenew
9.4Customize the transaction behavior of JDBC and commit transactionsnew
9.5Use the JDBC 4.1 RowSetProvider, RowSetFactory, and RowSet interfacesnew
10.1Create and use the Thread class and the Runnable interface4.1
10.2Manage and control thread lifecycle4.2
10.3Synchronize thread access to shared data4.3
10.4Identify potential threading problems4.3
11.1Use java.util.concurrent collectionsnew
11.2Apply atomic variables and locksnew
11.3Use Executors and ThreadPoolsnew
11.4Use the parallel Fork/Join Frameworknew
12.1Read and set the locale by using the Locale object3.3
12.2Build a resource bundle for each localnew
12.3Load a resource bundle in an applicationnew
12.4Format text for localization by using NumberFormat and DateFormat3.3

OCJP 6 ObjectiveOCJP 6 TextOCA/OCP 7 Objective
Section 1: Declarations, Initialization and Scoping
1.1Develop code that declares classes (including abstract and all forms of nested classes), interfaces, and enums, and includes the appropriate use of package and import statements (including static imports).OCA 1.2, 1.4, 6.1, OCP 2.2, 2.4, 2.5, 3.1
1.2Develop code that declares an interface. Develop code that implements or extends one or more interfaces.OCA 7.1, 7.3, 7.4, 7.5, 7.6, OCP 3.1
1.3Develop code that declares an abstract class. Develop code that extends an abstract class.OCA 7.1, 7.3, 7.4, 7.5, 7.6, OCP 2.1
1.4Develop code that declares, initializes, and uses primitives, arrays, enums, and objects as static, instance, and local variables. Also, use legal identifiers for variable names.OCA 1.1, 2.1, 2.2, 2.3, 4.1, 4.2, 6.2, OCP 2.3, 2.5
1.5Given a code example, determine if a method is correctly overriding or overloading another method, and identify legal return values (including covariant returns), for the method.OCA 6.3
1.6Given a set of classes and superclasses, develop constructors for one or more of the classes. Given a class declaration, determine if a default constructor will be created, and if so, determine the behavior of that constructor. Given a nested or non-nested class listing, write code to instantiate the class.OCA 6.4, 6.5
Section 2: Flow Control
2.1Develop code that implements an if or switch statement; and identify legal argument types for these statements.OCA 3.4, 3.5
2.2Develop code that implements all forms of loops and iterators, including the use of for, the enhanced for loop (for-each), do, while, labels, break, and continue; and explain the values taken by loop counter variables during and after loop execution.OCA 5.x
2.3Develop code that makes use of assertions, and distinguish appropriate from inappropriate uses of assertions.OCP 6.5
2.4Develop code that makes use of exceptions and exception handling clauses (try, catch, finally), and declares methods and overriding methods that throw exceptions.OCA 8.2, 8.3
2.5Recognize the effect of an exception arising at a specified point in a code fragment. Note that the exception may be a runtime exception, a checked exception, or an error.OCA 8.1, 8.4, OCP 6.1
2.6Recognize situations that will result in any of the following being thrown: ArrayIndexOutOfBoundsException,ClassCastException, IllegalArgumentException, IllegalStateException, NullPointerException, NumberFormatException, AssertionError, ExceptionInInitializerError, StackOverflowError or NoClassDefFoundError. Understand which of these are thrown by the virtual machine and recognize situations in which others should be thrown programatically.OCA 8.5
Section 3: API Contents
3.1Develop code that uses the primitive wrapper classes (such as Boolean, Character, Double, Integer, etc.), and/or autoboxing & unboxing. Discuss the differences between the String, StringBuilder, and StringBuffer classes.OCA 2.6, 2.7, OCP 4.4, 5.1
3.2Given a scenario involving navigating file systems, reading from files, writing to files, or interacting with the user, develop the correct solution using the following classes (sometimes in combination), from BufferedReader, BufferedWriter, File, FileReader, FileWriter, PrintWriter, and Console.OCP 7.1. 7.2
3.3Use standard J2SE APIs in the java.text package to correctly format or parse dates, numbers, and currency values for a specific locale; and, given a scenario, determine the appropriate methods to use if you want to use the default locale or a specific locale. Describe the purpose and use of the java.util.Locale class.OCP 12.1, 12.4
3.4Write code that uses standard J2SE APIs in the java.util and java.util.regex packages to format or parse strings or streams. For strings, write code that uses the Pattern and Matcher classes and the String.split method. Recognize and use regular expression patterns for matching (limited to: . (dot), * (star), + (plus), ?, \d, \s, \w, [], ()). The use of *, +, and ? will be limited to greedy quantifiers, and the parenthesis operator will only be used as a grouping mechanism, not for capturing content during matching. For streams, write code using the Formatter and Scanner classes and the PrintWriter.format/printf methods. Recognize and use formatting parameters (limited to: %b, %c, %d, %f, %s) in format strings.OCP 5.2, 5.3
Section 4: Concurrency
4.1Write code to define, instantiate, and start new threads using both java.lang.Thread and java.lang.Runnable.OCP 10.1
4.2Recognize the states in which a thread can exist, and identify ways in which a thread can transition from one state to another.OCP 10.2
4.3Given a scenario, write code that makes appropriate use of object locking to protect static or instance variables from concurrent access problems.OCP 10.3, 10.4
Section 5: OO Concepts
5.1Develop code that implements tight encapsulation, loose coupling, and high cohesion in classes, and describe the benefits.OCA 6.7, OCP 3.7, 3.9
5.2Given a scenario, develop code that demonstrates the use of polymorphism. Further, determine when casting will be necessary and recognize compiler vs. runtime errors related to object reference casting.OCA 7.2, OCP 1.4
5.3Explain the effect of modifiers on inheritance with respect to constructors, instance or static variables, and instance or static methods.OCP 1.2, 1.3
5.4Given a scenario, develop code that declares and/or invokes overridden or overloaded methods and code that declares and/or invokes superclass, or overloaded constructors.OCP 1.2, 1.3
5.5Develop code that implements "is-a" and/or "has-a" relationships.OCP 3.3
Section 6: Collections / Generics
6.1Given a design scenario, determine which collection classes and/or interfaces should be used to properly implement that design, including the use of the Comparable interface.OCP 4.5, 4.6
6.2Distinguish between correct and incorrect overrides of corresponding hashCode and equals methods, and explain the difference between == and the equals method.OCP 1.6
6.3Write code that uses the generic versions of the Collections API, in particular, the Set, List, and Map interfaces and implementation classes. Recognize the limitations of the non-generic Collections API and how to refactor code to use the generic versions. Write code that uses the NavigableSet and NavigableMap interfaces.OCA 4.3, OCP 4.3, 4.5, 4.6
6.4Develop code that makes proper use of type parameters in class/interface declarations, instance variables, method arguments, and return types; and write generic methods or methods that make use of wildcard types and understand the similarities and differences between these two approaches.OCP 4.1
6.5Use capabilities in the java.util package to write code to manipulate a list by sorting, performing a binary search, or converting the list to an array. Use capabilities in the java.util package to write code to manipulate an array by sorting, performing a binary search, or converting the array to a list. Use the java.util.Comparator and java.lang.Comparable interfaces to affect the sorting of lists and arrays. Furthermore, recognize the effect of the "natural ordering" of primitive wrapper classes and java.lang.String on sorting.OCP 4.7, 4.8
Section 7: Fundamentals
7.1Given a code example and a scenario, write code that uses the appropriate access modifiers, package declarations, and import statements to interact with (through access or inheritance) the code in the example.OCA 6.6, OCP 1.1, 1.7
7.2Given an example of a class and a command-line, determine the expected runtime behavior.OCA 1.3 (a bit)
7.3Determine the effect upon object references and primitive values when they are passed into methods that perform assignments or other modifying operations on the parameters.OCA 6.8
7.4Given a code example, recognize the point at which an obje ct becomes eligible for garbage collection, determine what is and is not guaranteed by the garbage collection system, and recognize the behaviors of the Object.finalize() method.OCA 2.4
7.5Given the fully-qualified name of a class that is deployed inside and/or outside a JAR file, construct the appropriate directory structure for that class. Given a code example and a classpath, determine whether the classpath will allow the code to compile successfully.removed
7.6Write code that correctly applies the appropriate operators including assignment operators (limited to: =, +=, -=), arithmetic operators (limited to: +, -, *, /, %, ++, --), relational operators (limited to: <, <=, >, >=, ==, !=), the instanceof operator, logical operators (limited to: &, pipe, ^, !, &&, double pipe), and the conditional operator ( ? : ), to produce a desired result. Write code that determines the equality of two objects or two primitives.OCA 3.1, 3.2, 3.3, OCP 1.4

Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic