Preparing for the APCS Exam

This page is derived from (but not a copy of) the College Board documentation on their APCS exam. Everything you need to know to pass their test is documented somewhere in our website [Real Soon Now], and most of it is built into the programs you already wrote (if you followed our advice). If you learn this material (and can pass the APCS test, even if you don't actually take it) you will have a pretty good command of the Java language, and you can pick up whatever else you need to know on the fly when writing larger and more complex programs. If you wish to take the test, you probably should spend some time on their site and try to do their practice questions.

[This page is still under development]
 

Contents

Java Class Library
More TBA

Java Class Library

You are expected to use these standard Java methods and constants when appropriate. You will be docked points if you write your own code where one of these would do the job. The links point to our documentation on these items (some TBD), but you probably should also read and understand the official documents (for example Google "Java String class"). They say that a "Java Quick Reference" page is included in the exam booklet when you take the test, so you probably do not need to memorize this stuff, just know what it does.

String Class

String(String str)
int length()
String substring(int from, int to)
String substring(int from)
int indexOf(String str)
boolean equals(String other)
int compareTo(String other)
 

Integer Class

Integer(int value)
Integer.MIN_VALUE
Integer.MAX_VALUE
int intValue()
 

Double Class

Double(double value)
double doubleValue()
 

Math Class

static int abs(int x)
static double abs(double x )
static double pow(double base, double exponent)
static double sqrt(double x)
static double random()
 

ArrayList Class

int size()
boolean add(E obj)
void add(int index, E obj)
get(int index)
set(int index, E obj)
remove(int index)
 

Object Class

boolean equals(Object other)
String toString()

Draft: 2022 April 12