Please enable JavaScript to use CodeHS

AP Computer Science A (Mocha)

Learn the basics of object-oriented programming with a focus on problem solving and algorithm development. Take this course and prepare to ace the AP® Computer Science A test.

Introduction to Programming in Java with Karel the Dog

In this module, students learn the basics of java commands, control structures, and problem solving by solving puzzles with Karel.

Basic Java

In this module, students learn the basics of the Java programming language. This module covers printing, variables, types, as well as how to use the basic control structures in the Java language.


In this module, students learn how to define methods in their programs and use autograders to test if their methods are working correctly.

Classes and Object-Oriented Programming

This module teaches students the basics of Object Oriented Programming in Java, which is a powerful programming paradigm. Students will learn how objects store data and interact with each other in Java programs. Students will design and implement classes and extend classes using inheritance.

Data Structures

In this module, students learn basic data structures in Java including arrays, ArrayLists, 2 dimensional arrays and HashMaps. Data structures will be used to design larger applications.


In this project, students will develop the classic game BlackJack!


In this project, students use Object Oriented design to implement the board game Battleship.

Algorithms and Recursion

In this module, students will be introduced to fundamental searching and sorting algorithms including sequential search, binary search, insertion sort, selection sort, and mergesort, as well as the important concept of recursion.

AP Test Practice

In this module, students will get a practice exam in the same format as the AP Computer Science in Java test.

Final Project

In this module, students take the skills they've learned throughout the course to create a final project.

Try it!

Check out the programs you'll be able to make
view demos

Learning on CodeHS