1. Name the return type
Before using a method, say what it returns. `length()` returns an `int`; `substring` returns a `String`; `set` returns the old element.
The AP exam gives you this reference sheet, but it does not explain when or why to use each method. Use this page to connect signatures, return values, indexing rules, and common AP-style traps.
Filter by class, search for a method, then open a card to see its purpose, example, and AP exam reminder.
These quick checks focus on the patterns students most often miss: end-exclusive substrings, `indexOf` returning `-1`, `ArrayList` shifting, `random` ranges, and scanner line-reading behavior.
String
Before using a method, say what it returns. `length()` returns an `int`; `substring` returns a `String`; `set` returns the old element.
Write positions above a string or list. Most AP mistakes happen when students skip the index map.
Ask whether the method changes the object. `ArrayList add`, `set`, and `remove` change the list; `String` methods return new values.
This page is a study companion for the College Board AP Computer Science A Java Quick Reference. Use the official PDF as the final authority for exam-day wording and included methods.