CHS-J1 logo
Focused certification exam prep
Start practice

CHS-J1 Cheat Sheet 2026: One-Page Review of Must-Know Facts

TL;DR
  • CodeHS Java Level 1 is 45 multiple-choice questions, timed at 90 minutes, with a 50% passing score for Java.
  • Five official domains: Java Fundamentals, Data Types and Expressions, Flow Control, Object-Oriented Programming, and Recursion.
  • Domain 4 tests recognizing class hierarchies, but excludes implementing inheritance, polymorphism, abstract classes, and interfaces.
  • Each exam attempt requires a new voucher, and credentials expire after 10 years.

The Exam Snapshot: Facts You Must Know Cold

This page condenses CodeHS Java Level 1 (CHS-J1) into one reviewable sheet. It covers the exam mechanics first, then the five content domains, then the traps that cost candidates points. Everything here is drawn from the official CodeHS Java Level 1 Certification overview and the CodeHS Certifications FAQ. If you want the long-form version of any section, the CHS-J1 study guide walks through a full preparation plan.

ItemWhat CodeHS States
IssuerCodeHS
Exam nameCodeHS Java Level 1 Certification Exam
FormatOnline timed exam
Questions45 multiple-choice questions
Time limit90 minutes (per the CodeHS Certifications FAQ)
Passing score50% for Java
PrerequisitesNone required
Recommended prepCodeHS AP CSA Course
RetakesA new voucher is required for each attempt
Credential validityExpires after 10 years
Domain weightsNot published; five topic headings only
Do the arithmetic early: 90 minutes across 45 questions averages two minutes per question. That is generous for single-concept items but tight for questions that ask you to trace a nested loop or a recursive call tree. Budget your time by question type, not evenly. For a deeper look at how the score works, see the CHS-J1 passing score guide.

Because CodeHS does not publish percentage weights for the five topic headings, you cannot safely skip any domain. Treat all five as live. The complete guide to the five content areas expands on how each heading breaks down.

Domain 1 Cheat Sheet: Java Fundamentals

This domain covers two named objectives: basic input and output using standard packages (including Scanner), and evaluating the scope of a variable. It is the smallest domain on paper, but the concepts underpin every code-reading question that follows.

Input and Output with Standard Packages

Know how a program reads and prints data, and what has to be imported to do it.

  • import java.util.Scanner; is required before you can create a Scanner object.
  • Create a scanner with new Scanner(System.in).
  • nextInt(), nextDouble(), next(), and nextLine() read different kinds of input.
  • Know the difference between System.out.print and System.out.println: the second ends the line.
  • Remember the classic leftover-newline behavior: after nextInt(), a following nextLine() can return an empty string because the newline is still in the buffer.

Variable Scope

Scope questions ask where a variable exists and where using it causes a compile error.

  • A variable declared inside a block (loop body, if, method) is not visible outside that block.
  • A loop variable declared in a for header is limited to that loop.
  • Instance variables are visible to the whole class's instance methods; local variables are not.
  • A local variable can shadow an instance variable of the same name; without this., the local one wins.

Domain 2 Cheat Sheet: Data Types, Variables, and Expressions

This is the heaviest domain by number of named objectives: primitives with casting and arithmetic, Strings and string methods including parsing, arrays, ArrayLists, and 2D arrays. Expect a large share of the 45 questions to touch it, even though CodeHS does not publish an exact split.

Primitives, Casting, and Arithmetic

  • Integer division truncates: 7 / 2 is 3, not 3.5. Dividing an int by an int never produces a fraction.
  • Modulus returns the remainder: 7 % 2 is 1. It is the standard tool for even/odd checks and wraparound logic.
  • Casting a double to an int truncates, it does not round: (int) 3.99 is 3.
  • Cast placement matters: (double) (a / b) divides as integers first, then casts. (double) a / b casts first, then divides as doubles.
  • Widening is automatic, narrowing needs a cast: assigning an int to a double is fine; the reverse is a compile error without an explicit cast.
  • Know the common primitives: int, double, boolean, char.
  • Compound assignment (+=, -=, *=) and increment/decrement (++, --) appear constantly inside traced code.

Strings and String Methods

  • Strings are immutable. Methods like toUpperCase() return a new String; they do not change the original.
  • Indexing starts at 0. length() returns the count of characters, so the last valid index is length() - 1.
  • substring(start, end) includes start and excludes end. substring(start) runs to the end.
  • indexOf(...) returns -1 when the target is not found.
  • Compare Strings with equals(), not ==. Use compareTo() for ordering.
  • Parsing means converting text to numbers, such as Integer.parseInt("42") and Double.parseDouble("3.5"). Know what kind of failure happens when the text is not numeric.

Arrays, ArrayLists, and 2D Arrays

Arrays

Fixed length, zero-indexed, one declared element type.

  • Declare and create with new int[5]; default values are 0 for numeric types, false for boolean, and null for objects.
  • Use arr.length (no parentheses) for the size.
  • Accessing index arr.length throws an out-of-bounds exception at run time.
  • Know array initializer syntax: int[] a = {1, 2, 3};

ArrayLists

Resizable, object-only, accessed through methods rather than brackets.

  • Use size(), get(i), set(i, x), add(x), add(i, x), and remove(i).
  • Removing elements while traversing forward skips items, because remaining elements shift left. Expect questions built around this.
  • Primitives are stored via wrapper types such as Integer and Double.
  • Know the contrast: arrays use .length, Strings use .length(), ArrayLists use .size().

2D Arrays

An array of arrays, indexed row first, then column.

  • grid.length is the number of rows; grid[0].length is the number of columns.
  • Row-major traversal puts the row loop outside and the column loop inside.
  • Swapping the loop order changes the traversal order, and questions often test exactly that.
  • Watch for off-by-one errors in nested bounds.

Domain 3 Cheat Sheet: Flow Control

This domain covers Boolean expressions (understanding and evaluating logic) and iteration using for loops, for-each loops, and while loops.

Boolean Expressions

  • Operators: && (and), || (or), ! (not), plus relational operators ==, !=, <, >, <=, >=.
  • Short-circuit evaluation: in a && b, if a is false, b is never evaluated. In a || b, if a is true, b is skipped. This is how x != 0 && 10 / x > 1 avoids a divide-by-zero.
  • De Morgan's laws: !(a && b) equals !a || !b, and !(a || b) equals !a && !b. Questions frequently ask which expression is equivalent to a negated compound condition.
  • Precedence runs !, then &&, then ||. When in doubt, add parentheses mentally.
  • A single = is assignment; == is comparison.

Loops

LoopBest ForWatch Out For
forKnown number of iterations, index accessOff-by-one in the condition (< versus <=)
for-eachVisiting every element when you do not need the indexReassigning the loop variable does not change the array's primitive elements
whileRepeating until a condition changesForgetting to update the variable, producing an infinite loop
  • A loop whose condition is false at the start runs zero times.
  • Count iterations precisely: for (int i = 0; i < 5; i++) runs 5 times; for (int i = 1; i <= 5; i++) also runs 5 times.
  • Nested loops multiply: an outer loop of 3 and an inner loop of 4 execute the inner body 12 times.
  • A for-each loop cannot safely add or remove ArrayList elements during traversal.

Key Takeaway

For any loop question, write a small trace table with one column per variable and one row per iteration. Candidates who trace on paper catch off-by-one errors that candidates who "eyeball" the loop miss. This habit pays off in Domains 2, 3, and 5.

Domain 4 Cheat Sheet: Object-Oriented Programming

This domain covers creating and using objects, writing classes (methods, instance variables, static methods), and recognizing class hierarchies and inheritance. The scope note matters: Level 1 excludes implementing inheritance, polymorphism, abstract classes, and interfaces. You must be able to read and recognize a hierarchy, but you are not being tested on building one. Do not spend your review time writing abstract classes or interface implementations; stay focused on what the exam covers.

Creating and Using Objects

  • Objects are created with new and a constructor call: Dog d = new Dog("Rex");
  • Variables hold references to objects. Two variables can point to the same object, so a change through one is visible through the other.
  • An unassigned object reference is null; calling a method on it causes a null pointer exception.
  • Use dot notation to call methods: d.bark().

Writing Classes

  • Instance variables are typically private, with public accessor (getter) and mutator (setter) methods.
  • A constructor has the same name as the class and no return type.
  • Methods declare a return type; a void method returns nothing.
  • Use this to refer to the current object, especially when a parameter shares a name with an instance variable.
  • Know how parameters are passed: primitives are passed by value, and object references are passed by value too, so a method can modify the object a reference points to but cannot reassign the caller's variable.

Static Methods and Variables

  • Static members belong to the class, not to any one object, and are called as ClassName.method().
  • A static method cannot directly use instance variables or call instance methods, because there is no current object.
  • A static variable is shared by all instances, which makes it the natural tool for counting how many objects were created.

Recognizing Class Hierarchies

  • Read class Puppy extends Dog as "Puppy is a Dog" and know the subclass inherits accessible members of the superclass.
  • Be able to identify superclass and subclass relationships from code you are shown.
  • Know what super refers to when you see it in provided code.
  • Recognition only: you are not asked to design the hierarchy from scratch.

Domain 5 Cheat Sheet: Recursion

The official topic is general recursion analysis, including understanding the base case and execution counts. This is an analysis domain: you read a recursive method and predict what it returns, how many times it runs, or why it fails.

  • Every recursive method needs a base case that stops the recursion, and each recursive call must move toward it. A missing or unreachable base case leads to infinite recursion and a stack overflow.
  • Trace from the top down, then resolve from the bottom up. Write each call, expand until the base case, then substitute return values back up the chain.
  • Execution counts: count calls, not just the final answer. A method like f(n) that calls f(n - 1) once per call makes n + 1 calls when the base case is n == 0. A method that calls itself twice per call grows much faster.
  • Order of statements matters: a print statement placed before the recursive call outputs in a different order than one placed after it. Questions love this distinction.
  • Return versus print: know whether the method returns a value or prints as a side effect, and what each call hands back to its caller.
Practice pattern: Take a short recursive method such as a factorial, a sum of digits, or a string reversal, and trace it for three different inputs. Then change the base case on purpose and predict the new behavior. This is the fastest way to build the "execution count" instinct the exam targets.

Classic Traps Hidden in Multiple-Choice Code Questions

With 45 multiple-choice questions, wrong answers are usually plausible results of a specific mistake. Recognizing the trap behind each distractor is a real scoring advantage. If you are weighing how demanding the test is overall, the CHS-J1 difficulty guide puts these patterns in context.

TrapWhat Goes WrongHow to Defend
Integer divisionExpecting a decimal from int / intCheck the types of both operands before evaluating
Cast timingCasting after the division instead of beforeRead where the parentheses close
== on StringsComparing references instead of contentsPrefer equals(); know why == is unreliable
Off-by-one boundsLoop runs to length instead of length - 1Test the first and last iteration by hand
Substring end indexForgetting the end index is exclusiveCount characters: end minus start equals the length
ArrayList removal in a loopSkipping elements after a removal shifts the listTrace the index and the shrinking size together
Short-circuit side effectsAssuming both sides of && always runStop evaluating as soon as the result is decided
Static versus instanceCalling an instance method from a static contextAsk "which object is this running on?"
Missing base caseRecursion never terminatesConfirm each call gets closer to the stopping condition

Scheduling Your Review Around the Five Domains

Since no domain weights are published, a balanced plan that front-loads the densest material works best. This sample sequence puts Domain 2 first because it contains the most named objectives and feeds every later topic.

Week 1

Domain 1 and the first half of Domain 2

  • Scanner input, output methods, and variable scope
  • Primitives, casting, integer division, and modulus
  • String methods and parsing
Week 2

Collections and flow control

  • Arrays, ArrayLists, and 2D arrays with hand-traced traversals
  • Boolean logic, short-circuiting, and De Morgan's laws
  • for, for-each, and while loops with trace tables
Week 3

Objects and recursion

  • Writing classes, constructors, static members, and object references
  • Reading class hierarchies without implementing them
  • Recursion tracing: base cases and execution counts
Week 4

Timed mixed review

  • Full-length timed practice at about two minutes per question
  • Review every miss by naming the trap from the table above
  • Revisit your weakest domain one last time

Mixed timed practice is where you convert knowledge into exam speed. The CHS-J1 practice tests are built for exactly that kind of repetition, and you can review answers domain by domain afterward.

Vouchers, Attempts, and Credential Life

The administrative facts are short but worth memorizing so nothing surprises you on exam day.

  • No prerequisites. CodeHS lists none, though it recommends the CodeHS AP CSA Course as preparation. The CHS-J1 requirements guide covers eligibility in more detail.
  • A new voucher is needed for every attempt. If you do not pass, plan on obtaining another voucher before retesting rather than assuming a free retake.
  • Credentials expire after 10 years. That is a long window, but it is a stated feature of the credential.
  • Fees are not covered here. The official sources used for this sheet do not publish a fee, so check your school, district, or CodeHS contact for current pricing. The certification cost breakdown explains how costs are typically handled.
  • Scheduling. For testing windows and deadlines, see the CHS-J1 exam dates page.

Key Takeaway

Before exam day, confirm three things: you have a valid voucher in hand, you know the 90-minute limit, and you understand that the pass line is 50%. Knowing the threshold lets you manage risk sensibly, such as moving past a stubborn recursion question instead of letting it drain time from easier items.

If you are still deciding whether the credential suits your goals, the ROI analysis weighs it against the effort required.

Frequently Asked Questions

How many questions are on the CodeHS Java Level 1 exam?

The exam has 45 multiple-choice questions, delivered as an online timed exam. The CodeHS Certifications FAQ states a 90-minute time limit.

What score do I need to pass CHS-J1?

The CodeHS Certifications FAQ lists the passing score for Java as 50%. For a closer look at what that means in practice, read the passing score guide.

Does the exam require me to write inheritance, interfaces, or abstract classes?

No. Domain 4 covers recognizing class hierarchies and inheritance, but the scope explicitly excludes implementing inheritance, polymorphism, abstract classes, and interfaces. Focus on reading hierarchies, writing ordinary classes, and using objects.

Are the five domains weighted differently?

CodeHS lists five Topics and Concepts Covered headings but does not publish percentage weights. Because of that, prepare for all five: Java Fundamentals, Data Types and Expressions, Flow Control, Object-Oriented Programming, and Recursion.

What happens if I do not pass on the first try?

CodeHS requires a new voucher for each exam attempt, so a retake means obtaining another voucher. Review your missed questions by domain before retesting, and use the study guide to rebuild your plan around your weakest area.

Keep this sheet handy, trace every code snippet by hand, and take timed practice runs on the main practice test site until the two-minute-per-question pace feels natural.

Ready to pass your CHS-J1 exam?

Put this into practice with free CHS-J1 questions across every exam domain.