The Sun Certified Java Programmer (SCJP) โ now rebranded as the Oracle Certified Professional Java SE Programmer (OCPJP) โ is the most widely recognized Java certification for developers at the associate and professional level. Our free printable SCJP practice test PDF gives you realistic exam-style questions covering Java SE fundamentals, object-oriented concepts, collections, generics, exception handling, concurrency, and I/O so you can study and review offline at your own pace.
Whether you are targeting the older SCJP 6 or SCJP 5 objectives, or preparing for the current Oracle Java SE 8/11/17 OCA/OCP path, this PDF covers the foundational concepts that appear across all versions. It is especially useful as a final review tool: print it the week before your exam, work through it timed, and use the answer key to identify any remaining weak areas that need targeted revision.
The SCJP exam tests Java fundamentals more rigorously than most developers expect. Data types divide into primitives (byte, short, int, long, float, double, char, boolean) and reference types (objects, arrays, strings). You must know the exact range of each primitive type โ int is 32-bit signed (โ2,147,483,648 to 2,147,483,647), long is 64-bit โ and how narrowing conversions (casting a larger type to a smaller one) can cause data loss. Automatic widening conversions happen without a cast; narrowing always requires an explicit cast.
String handling is heavily tested. The String class is immutable โ every operation that appears to modify a String actually creates a new object. The StringBuilder class (and its thread-safe counterpart StringBuffer) uses a mutable internal buffer. Know the difference between == (reference comparison) and .equals() (content comparison), and understand the String pool: string literals are interned, so two String literals with the same value share the same reference, but strings created with new String("...") do not.
SCJP is fundamentally an OOP exam. Inheritance allows a subclass to extend a superclass, inheriting non-private fields and methods. Polymorphism means a reference of type Superclass can point to an object of type Subclass, and calling an overridden method on that reference will invoke the subclass's implementation at runtime โ this is dynamic dispatch. The instanceof operator tests whether an object is an instance of a given class or interface before downcasting.
Interfaces define contracts without implementation (prior to Java 8 default methods). A class can implement multiple interfaces but can only extend one class โ this is Java's answer to multiple inheritance. Abstract classes can have both abstract methods (no body, must be overridden) and concrete methods (with bodies). You cannot instantiate an abstract class directly. Know when to use an interface (contract across unrelated classes) vs. an abstract class (shared behavior among closely related classes).
Encapsulation means using private fields with public getters and setters to control access to an object's state. The exam tests whether you understand access modifiers: private (class only), package-private/default (package only), protected (package + subclasses), and public (everywhere). Method overloading (same name, different parameter types/count) is resolved at compile time; overriding (same signature in subclass) is resolved at runtime.
The Java Collections Framework provides ready-to-use data structures. ArrayList is a resizable array backed by an array internally; LinkedList is a doubly-linked list better suited for frequent insertions and deletions. HashSet stores unique elements with no guaranteed order; TreeSet stores unique elements in natural sorted order; LinkedHashSet maintains insertion order. HashMap stores key-value pairs with no ordering guarantee; TreeMap sorts by key; LinkedHashMap maintains insertion order.
Generics allow you to write type-safe collections without casting. List<String> is a list that only accepts String elements at compile time. Bounded wildcards add flexibility: List extends Animal> accepts lists of Animal or any subclass (useful for reading); List super Dog> accepts lists of Dog or any superclass (useful for writing). The SCJP exam often presents tricky generic method signatures and asks you to determine whether a given method call compiles or produces a ClassCastException at runtime.
Arrays are fixed-size and have a length field (not a method). Two-dimensional arrays in Java are arrays of arrays, so rows can have different lengths (jagged arrays). The Arrays utility class provides sort(), binarySearch(), fill(), and copyOf() methods. When sorting objects, they must implement Comparable, or you must provide a Comparator โ know both approaches.
Java exceptions divide into checked exceptions (must be declared with throws or caught with try-catch โ e.g., IOException, SQLException) and unchecked exceptions (extend RuntimeException โ e.g., NullPointerException, ArrayIndexOutOfBoundsException). Errors (OutOfMemoryError, StackOverflowError) are not meant to be caught. The finally block always executes whether or not an exception was thrown, making it the correct place for resource cleanup โ though Java 7+ try-with-resources is the modern preferred approach.
Thread creation in Java has two approaches: extend Thread and override run(), or implement Runnable and pass it to a Thread constructor. The Runnable approach is generally preferred because it does not consume your single inheritance slot. Shared mutable state in multi-threaded code requires synchronization โ either with the synchronized keyword on methods or blocks, or with higher-level utilities like ReentrantLock, AtomicInteger, and ConcurrentHashMap from java.util.concurrent. The volatile keyword ensures visibility of variable writes across threads but does not provide atomicity for compound operations like i++.
Sun Microsystems created the original SCJP certification, which targeted Java SE 1.4, 5, and 6. When Oracle acquired Sun in 2010, they restructured the certification path: the Oracle Certified Associate Java SE Programmer (OCA) is the entry-level credential, and the Oracle Certified Professional Java SE Programmer (OCP/OCPJP) is the professional level. The topics covered are broadly the same, with newer versions adding Java 8 features (lambda expressions, streams API, Optional, method references, functional interfaces) and Java 11/17 features (local-variable type inference with var, text blocks, sealed classes).
Ready to test yourself in the browser? Take our full-length SCJP practice test online with instant scoring, detailed explanations for every answer, and performance tracking across all Sun/Oracle Java SE exam domains.