SCJP / OCJP Exam Objectives and what you need to study for each section

I passed the exam, so this list may stay incomplete until I find time to finish it off. You can read my tips on passing the exam here, or have a look at my SCJP code snippets on github here.


This page outlines all of the Sun / Oracle (SCJP/OCJP/OCPJP)specified objectives that you must meet to pass the exam. To make it easier for studying I have listed out the topics for each section that you will need to research, I’ll add links to any posts I’ve written to help

Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 (CX-310-055) Exam Objectives

Section 1: Declarations, Initialization and Scoping

  1. Develop 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).
  2. Develop code that declares an interface. Develop code that implements or extends one or more interfaces. Develop code that declares an abstract class. Develop code that extends an abstract class.
  3. Develop code that declares, initializes, and uses primitives, arrays, enums, and objects as static, instance, and local variables. Also, use legal identifiers for variable names.
  4. Develop code that declares both static and non-static methods, and – if appropriate – use method names that adhere to the JavaBeans naming standards. Also develop code that declares and uses a variable-length argument list.
  5. Given 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.
  6. Given 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.

Topics that you need to study:

Section 2: Flow Control

  1. Develop code that implements an if or switch statement; and identify legal argument types for these statements.
  2. Develop 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.
  3. Develop code that makes use of assertions, and distinguish appropriate from inappropriate uses of assertions.
  4. Develop code that makes use of exceptions and exception handling clauses (try, catch, finally), and declares methods and overriding methods that throw exceptions.
  5. Recognize 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.
  6. Recognize 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.

Topics that you need to study:

  • Writing Code using if and switch statements
  • Writing code using loops
  • Using break and continue
  • Handling exceptions
  • Working with the Assertion mechanism

Section 3: API Contents

  1. Develop 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.
  2. Given a scenario involving navigating file systems, reading from files, or writing to files, develop the correct solution using the following classes (sometimes in combination), from BufferedReader,BufferedWriter, File, FileReader, FileWriter and PrintWriter.
  3. Develop code that serializes and/or de-serializes objects using the following APIs from DataInputStream, DataOutputStream, FileInputStream, FileOutputStream, ObjectInputStream, ObjectOutputStream and Serializable.
  4. Use 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.
  5. Write 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.

Topics you need to study:

  • Stack and Heap
  • Using Wrappers
  • Boxing
  • Using String, StringBuffer and StringBuilder
  • File I/O
  • Serialization
  • Dates, Numbers and Currency
  • Parsing, Tokenizing and Formatting

Section 4: Concurrency

  1. Write code to define, instantiate, and start new threads using both java.lang.Thread and java.lang.Runnable.
  2. Recognize the states in which a thread can exist, and identify ways in which a thread can transition from one state to another.
  3. Given a scenario, write code that makes appropriate use of object locking to protect static or instance variables from concurrent access problems.
  4. Given a scenario, write code that makes appropriate use of wait, notify, or notifyAll.

Topics that you need to study:

  • Defining, Instantiating and Starting Threads
  • Transitioning between Thread states
  • Sleep, Yield and Join
  • Concurrent Access problems and synchronized Threads
  • Communicating with Objects by waiting and notifying
  • Deadlocked threads

Section 5: OO Concepts

  1. Develop code that implements tight encapsulation, loose coupling, and high ohesion in classes, and describe the benefits.
  2. Given 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.
  3. Explain the effect of modifiers on inheritance with respect to constructors, instance or static variables, and instance or static methods.
  4. Given a scenario, develop code that declares and/or invokes overridden or overloaded methods and code that declares and/or invokes superclass, overridden, or overloaded constructors.
  5. Develop code that implements “is-a” and/or “has-a” relationships.

Topics that you need to study:

Section 6: Collections / Generics

  1. Given 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.
  2. Distinguish between correct and incorrect overrides of corresponding hashCode and equals methods, and explain the difference between == and the equals method.
  3. Write 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.
  4. Develop 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.
  5. Use 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.

Topics that you need to study:

  • Overridng hashCode() and equals()
  • Collections
  • Key attributes of Common Collection Classes
  • Using collection classes
  • Sorting and searching Arrays and Lists
  • Utility classes: Collections and Arrays
  • Generics

Section 7: Fundamentals

  1. Given 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.
  2. Given an example of a class and a command-line, determine the expected runtime behavior.
  3. Determine the effect upon object references and primitive values when they are passed into methods that perform assignments or other modifying operations on the parameters.
  4. Given a code example, recognize the point at which an object becomes eligible for garbage collection, and determine what is and is not guaranteed by the garbage collection system. Recognize the behaviors of System.gc and finalization.
  5. Given 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.
  6. Write 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.

Topics that you need to study:

Loading Facebook Comments ...


  • gopi (3 years)

    hello sir this is gopi i need information about java certification presently test is scjp or ocjp if it is ocjp i need exam pattern.

  • gopi (3 years)

    sir need material of ocjp6

  • gopi (3 years)

    friends plz forword the material soft copy to my mail.

  • gopi (3 years)

    frieds plz forword ocjp6.0 soft copy to my mail.

  • [...] SCJP / OCJP Exam Objectives and what you need to study for each section [...]

  • lasa (3 years)

    im new to java.wt s d bst scjp or ocjp?pls answa

    • James Elsey (3 years)

      They are the same thing, SCJP (Sun) got renamed to (Oracle) OCPJP after they got bought out

  • sudheer (3 years)

    hi Elsey, i am sudheer here, I want ocjp exam pattern,duration of exam,how i get certificate from the oracle if get successed.And expalain the clear procedure to me ..i hope u will tell to all my friends like me..or send to my mail id..

    • James Elsey (3 years)

      Hi Sudheer,

      No need for me to re-write that, there is a perfectly good guide on the CodeRanch, check it out!

      Good luck

  • sudheer (3 years)

    is it any fee may payed to anydody regarding the scjp test… plz reply me….

    • James Elsey (3 years)

      Yes there is a fee, you have to buy a voucher in your country, please check the link I replied you with, that should contain all the information.

  • Bhishma (3 years)

    sir can you get the latest reliable ocjp dumps for me?

  • Website (3 years)

    sir, i am going to write the ocjp exam. So if u have the dumps, plz forward to my mail id sir.

  • shubha (3 years)

    please send some important pdf for getting prepared for the exam 310-065

  • shubha (3 years)

    in to my email

  • Oscar (3 years)

    Pls i nd java dommies for the exam preparation.

  • [...] SCJP / OCJP Exam Objectives and what you need to study for each section [...]

  • rama (2 years)

    Which books refer for ocjp exam?

    • James Elsey (2 years)

      The SCJP book by Kathy Sierra and Bert Bates is probably the most adopted book, it covers the topics very concisely and clearly :)

  • rama (2 years)

    how to prepare OCJP exam

  • Pratyush Nalam (2 years)

    Thanks for this! Really needed this info on SCJP and OCJP

  • divya (2 years)

    how to prpare for the OCJP exam?
    please suggest me and ive guidelines ..
    thank u..

  • ANIL BISHNOI (2 years)

    HELLO sir i m persuing from kuk uiversity….and now i m in final please give some advise for summer training….”what will do in sumer days ?”
    i do not know about java and other basic language nothing.. so my programming is very poor……so that help me rispected sir ji……………thank u ji

    anil bishnoi & mob. 9992877447

  • ANIL BISHNOI (2 years)


    HELLO sir i m persuing from kuk uiversity….and now i m in final please give some advise for summer training….”what will do in sumer days ?”
    i do not know about java and other basic language nothing.. so my programming is very poor……so that help me rispected sir ji……………thank u ji
    anil bishnoi & mob. 9992877447

  • Sunrita (2 years)

    Dear All
    I am planning to take OCJP exam
    Can you please help with the exam material and procedure to apply for the exam

  • krishna kumar (10 months)

    plz say how to apply the OCJP exam??????

Leave a Reply

Your email address will not be published. Required fields are marked *

× 6 = fifty four

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

No Trackbacks.

Go to Top