A six-unit practice course that follows AP Computer Science A: Java basics, selection and iteration, classes and objects, arrays and ArrayLists, inheritance, polymorphism and recursion, and a final unit on exam strategy for multiple-choice tracing and the four free-response question types. Plan on about 8 to 10 weeks at three lessons a week, with each lesson taking about 40 minutes including practice, and keep a free Java compiler or a free online Java runner open while you work.

6 modules · 18 lessons · about 14 hours · practice after every lesson and an exam for every module
Programs, variables and primitive types
Java is the programming language used in AP Computer Science A. A Java program is organized into classes, and a program starts running in a special method named main. To follow this course you need a way to compile and run Java: a free Java Development Kit (JDK) installed on your computer, or a free online Java runner in your browser. Either is enough. Type every example yourself, run it, and compare the output with what you predicted.
Each statement ends with a semicolon. System.out.println prints its argument and then moves to the next line. System.out.print prints without moving to a new line, so the next output continues on the same line. Java is case-sensitive: println works, but Println does not compile. Comments start with two slashes and are ignored by the compiler.
A variable is declared once with a type and a name, and its type never changes. You may assign a new value as often as you like. Names may use letters, digits and underscores but cannot begin with a digit, and by convention they start with a lowercase letter and capitalize later words, as in totalScore. An int literal has no decimal point; a double literal has one. You may store an int in a double variable because nothing is lost, but storing a double in an int variable is a compile-time error unless you cast, which the next lesson covers.
Adding the word final to a declaration makes it a constant: final int MAX_PLAYERS = 4; Any later attempt to assign to MAX_PLAYERS is a compile-time error. Constants are usually written in all capitals with underscores.
This is the real start of lesson 1.
A practice course; it does not replace the AP class or award credit. AP is a registered trademark of the College Board, which does not endorse this course. Your student needs only a computer with a free Java compiler installed or a free online Java runner in a browser, with nothing to buy. Plan on about 8 to 10 weeks of 40 minute sessions, and you can help by asking your student to explain one short program out loud each week; being able to trace code aloud is the single most useful exam skill.
For use by the purchasing family; please do not resell or post it. Questions or a problem with an order: team@caveatacademic.com. Caveat Academic Services is independent and not affiliated with any school district or curriculum publisher.