Java for AP CS A
Java programming for the AP Computer Science A exam.
java 19 Lessons
Every lesson runs in your browser — write real code, press Run, and the tasks check themselves. Free, no account needed, with notes in English and Chinese.
Lessons in this course
- history A short history of Java
- usage What Java is used for
- resources Where to learn more
- setup Set up your computer
- 01 Java basics: classes, main, and output
- 02 Using objects: String, Math, and wrappers
- 03 Booleans and selection: if/else and logic
- 04 Loops: while, for, and accumulation
- 05 Strings and nested loops
- 06 Writing a class: fields, constructor, methods
- 07 Encapsulation: private fields, getters, setters
- 08 1-D arrays: store, index, and traverse
- 09 Array algorithms: max, count, search, average
- 10 ArrayList: a list that grows
- 11 ArrayList algorithms: filter and the remove bug
- 12 2-D arrays: working with a grid
- 13 Searching: linear and binary
- 14 Sorting: selection and insertion sort
- 15 Recursion: base case and recursive case
- 16 Text files: write and read with Scanner
- 17 Inheritance: extends, super, and overriding
- 18 Polymorphism: dynamic dispatch and toString()
- 19 FRQ workshop: the 4 question types