SCJP Cheat Sheet 2026

The 30 highest-yield SCJP facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

72 questions
210 min time limit
65.00% to pass
  1. Which Java feature allows a class to inherit behavior from multiple sources without multiple inheritance of classes? Interfaces with default methods
  2. Which of the following is true about static initializer blocks? They run once when the class is first loaded
  3. Which of the following correctly describes the behavior of the finally block? It always executes unless System.exit() is called
  4. Which of the following is true about abstract classes in Java? They can contain both abstract and concrete methods
  5. Which Java I/O class should be used to write primitive data types (int, double, boolean) to a stream? DataOutputStream
  6. Which of the following methods can modify a String object, s? none of the above will change s
  7. In Java, can a single `catch` block catch multiple exception types? Yes, using a pipe (|) separator since Java 7 (multi-catch)
  8. Which interface must be implemented by a class to allow its objects to be sorted using Collections.sort()? Comparable
  9. The following class(es)' methods can be used to create directories: File
  10. Which interface should be implemented to allow objects to be sorted using `Arrays.sort()` without a Comparator? Comparable
  11. Which of the following is NOT part of the Java Collections Framework hierarchy? Array
  12. Which of the following is true about Java's 'break' statement in a switch block? It prevents fall-through to the next case
  13. What will be the result of 7 % 3 in Java? 1
  14. Which of the following is a correct way to create a new thread in Java? Extend Thread class or implement Runnable interface
  15. In Java generics, what does the wildcard '? extends T' indicate? Any type that is a subtype of T or T itself
  16. Which of the following correctly describes method overloading in Java? Same method name, different parameter list in the same class
  17. What is the effect of calling `System.gc()`? It is a request to the JVM to run garbage collection; the JVM may ignore it
  18. What does the String method replace(char oldChar, char newChar) return? A new String with all occurrences of oldChar replaced by newChar
  19. Which collection class is best suited for implementing a LIFO (Last-In-First-Out) stack in modern Java? java.util.ArrayDeque
  20. Which loop is guaranteed to execute its body at least once? do-while
  21. What is the result of: `Integer x = 200; Integer y = 200; System.out.println(x == y);`? false
  22. What is an enum in Java? A special class that represents a group of named constants
  23. Which collection class allows null keys and null values? HashMap
  24. What is the default value of an instance variable of type boolean in Java? false
  25. In Java, which method pair is used for inter-thread communication? notify() and wait()
  26. Which of the following initialization strategies for the array "dayhigh" with seven values is correct? int dayhigh[] = { 24, 23, 24, 25, 25, 23, 21 };
  27. Which of the following statements about a two-dimensional array of numbers is legal? int[]a[] = new int[5][5];
  28. What is the output of the following code? String s1 = "Java"; String s2 = "Java"; System.out.println(s1 == s2); true
  29. Which of the following interface features was introduced in Java 8 that affects how classes implement interfaces? Interfaces can have default methods with concrete implementations
  30. What does the `PriorityQueue` class use to determine the order of elements? Natural ordering or a Comparator
Turn these facts into recall:
Was this helpful?