- The Exam Snapshot: Facts You Must Know Cold
- Domain 1 Cheat Sheet: Java Fundamentals
- Domain 2 Cheat Sheet: Data Types, Variables, and Expressions
- Domain 3 Cheat Sheet: Flow Control
- Domain 4 Cheat Sheet: Object-Oriented Programming
- Domain 5 Cheat Sheet: Recursion
- Classic Traps Hidden in Multiple-Choice Code Questions
- Scheduling Your Review Around the Five Domains
- Vouchers, Attempts, and Credential Life
- Frequently Asked Questions
- 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.
| Item | What CodeHS States |
|---|---|
| Issuer | CodeHS |
| Exam name | CodeHS Java Level 1 Certification Exam |
| Format | Online timed exam |
| Questions | 45 multiple-choice questions |
| Time limit | 90 minutes (per the CodeHS Certifications FAQ) |
| Passing score | 50% for Java |
| Prerequisites | None required |
| Recommended prep | CodeHS AP CSA Course |
| Retakes | A new voucher is required for each attempt |
| Credential validity | Expires after 10 years |
| Domain weights | Not published; five topic headings only |
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 aScannerobject.- Create a scanner with
new Scanner(System.in). nextInt(),nextDouble(),next(), andnextLine()read different kinds of input.- Know the difference between
System.out.printandSystem.out.println: the second ends the line. - Remember the classic leftover-newline behavior: after
nextInt(), a followingnextLine()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
forheader 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 / 2is3, not3.5. Dividing anintby anintnever produces a fraction. - Modulus returns the remainder:
7 % 2is1. 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.99is3. - Cast placement matters:
(double) (a / b)divides as integers first, then casts.(double) a / bcasts first, then divides as doubles. - Widening is automatic, narrowing needs a cast: assigning an
intto adoubleis 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 islength() - 1. substring(start, end)includesstartand excludesend.substring(start)runs to the end.indexOf(...)returns-1when the target is not found.- Compare Strings with
equals(), not==. UsecompareTo()for ordering. - Parsing means converting text to numbers, such as
Integer.parseInt("42")andDouble.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 are0for numeric types,falsefor boolean, andnullfor objects. - Use
arr.length(no parentheses) for the size. - Accessing index
arr.lengththrows 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), andremove(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
IntegerandDouble. - Know the contrast: arrays use
.length, Strings use.length(), ArrayLists use.size().
2D Arrays
An array of arrays, indexed row first, then column.
grid.lengthis the number of rows;grid[0].lengthis 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, ifais false,bis never evaluated. Ina || b, ifais true,bis skipped. This is howx != 0 && 10 / x > 1avoids 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
| Loop | Best For | Watch Out For |
|---|---|---|
for | Known number of iterations, index access | Off-by-one in the condition (< versus <=) |
| for-each | Visiting every element when you do not need the index | Reassigning the loop variable does not change the array's primitive elements |
while | Repeating until a condition changes | Forgetting 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
newand 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
voidmethod returns nothing. - Use
thisto 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 Dogas "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
superrefers 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 callsf(n - 1)once per call makesn + 1calls when the base case isn == 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.
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.
| Trap | What Goes Wrong | How to Defend |
|---|---|---|
| Integer division | Expecting a decimal from int / int | Check the types of both operands before evaluating |
| Cast timing | Casting after the division instead of before | Read where the parentheses close |
== on Strings | Comparing references instead of contents | Prefer equals(); know why == is unreliable |
| Off-by-one bounds | Loop runs to length instead of length - 1 | Test the first and last iteration by hand |
| Substring end index | Forgetting the end index is exclusive | Count characters: end minus start equals the length |
| ArrayList removal in a loop | Skipping elements after a removal shifts the list | Trace the index and the shrinking size together |
| Short-circuit side effects | Assuming both sides of && always run | Stop evaluating as soon as the result is decided |
| Static versus instance | Calling an instance method from a static context | Ask "which object is this running on?" |
| Missing base case | Recursion never terminates | Confirm 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.
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
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
Objects and recursion
- Writing classes, constructors, static members, and object references
- Reading class hierarchies without implementing them
- Recursion tracing: base cases and execution counts
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
The exam has 45 multiple-choice questions, delivered as an online timed exam. The CodeHS Certifications FAQ states a 90-minute time limit.
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.
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.
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.
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.