JavaRanch Home    
 
This page:         last edited 04 October 2014         What's Changed?         Edit

OCAJP7 and OCPJP7 vs OCJP6   

Studying from an older book? Here's what you need to know.

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



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

OCJP 6 ObjectiveOCJP 6 Text OCA/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 java.io: 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: &, \|, ^, !, &&, \|\|), 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


CategoryCertification

JavaRanchContact us — Copyright © 1998-2014 Paul Wheaton