Six units for a first programming course, each topic linked to its own practice set. Open a unit for topic explanations, common mistakes, and practice.
Six units
From first program through decisions, repetition, text, collections, and finally writing your own classes.
No exam
This is a first course. Assessment is by projects and quizzes rather than a national exam.
No prerequisite
Suitable for a student who has never programmed. Middle school through early high school is typical.
Where it leads
AP Computer Science A, which revisits every one of these topics at exam depth.
Units
The six units
1
Unit 1 · Take your time
First Programs and Values
Storing values and doing arithmetic with them. Java asks you to say what kind of value each variable holds, which feels like extra work for about a week and then starts catching your mistakes for you.
Teaching a program to choose. The syntax is short; the difficulty is writing conditions that are true exactly when you meant them to be, especially at the edges of a range.
Doing something many times without writing it many times. Most early loop bugs are off by exactly one, which is why counting the iterations deliberately matters more than the syntax.
LoopCounterConditionIterationNested loopRunning total
Text that you can look inside but never change. Counting from zero takes some getting used to, and almost every early text bug is a position being one off.
Holding many values under one name. Arrays are a fixed size; lists grow and shrink. This is also the first place two names can point at the same data, which surprises everyone the first time.
Breaking a program into named pieces, then grouping data and behavior together into a class. This is the unit that makes larger programs possible rather than merely longer.
The course teaches one skill from the first day: predict what the computer will do before you run it. Everything else is built on that. Java is strict about types and boundaries, and this guide treats that strictness as a teaching aid rather than an obstacle, because it turns vague mistakes into specific errors.
Core topics
Essential foundations
• Variables, types, arithmetic, and why Java cares which type a value is
• Boolean logic and making a program choose between paths
• Loops, counters, and totals
• Strings as text you can inspect but not change
• Arrays and ArrayList for holding many values at once
• Methods and classes for organising a program into parts
Additional topics
Included in this sequence
• Reading and predicting code written by someone else
• Debugging by tracing rather than guessing
• Searching and sorting as first algorithms
• What it means to store data about people
Varies by course
Compare with the school syllabus
Pace. A middle school section may spend a full year on Units 1 to 4; an older beginner may finish all six in a semester.
Graphics. Some sections add drawing or simple games as motivation; these are not required by the sequence.
Environment. Browser-based editors and full IDEs are both common and neither affects the material.
Glossary
Terms worth being precise about
Variable
A named place that holds one value.
Type
The kind of value a variable holds, such as a whole number, a decimal, or true-or-false.
Whole-number division
Dividing two whole numbers, which cuts off the remainder rather than rounding.
Cast
Telling Java to treat a value as a different type.
Boundary
The exact value at the edge of a range, where most mistakes happen.
Iteration
One pass through the body of a loop.
Running total
A variable that builds up a result across the passes of a loop.
Index
The position of an item, counted from zero.
Method
A named block of code that can be given values and can hand one back.
Return
Handing a value back from a method to whatever called it.