SAT / PSAT
SAT / PSAT Prep
History & Social Science
AP World History AP US History AP European History AP Human Geography AP US Government & Politics AP Psychology AP Macroeconomics AP Microeconomics
English
AP English Language & Composition AP English Literature & Composition
Math & Computer Science
AP Calculus AB/BC AP Precalculus AP Statistics AP Computer Science A AP Computer Science Principles
Sciences
AP Biology AP Chemistry AP Environmental Science AP Physics 1 AP Physics 2
World Languages & Arts
AP Spanish Language AP Art History AP Music Theory Start studying →
Unit 1 · Using Objects & Methods Flashcards Cheat Sheet Essentials Visual Review MC Practice FRQ Practice

AP Computer Science A Unit 1 Essentials

The must-know terms and core concepts for Unit 1: Using Objects and Methods. Every vocabulary word, type, and idea you need to master.

← Back to Unit 1 hub
Key Concept 1
Data is stored in typed variables and combined in expressions
Every value in Java has a data type. The three primitives are int (integers), double (real numbers), and boolean (true/false); other values are reference types that point to objects. You store values in variables with the assignment operator, and combine them into expressions using arithmetic operators (+ − * / %). Operator precedence and integer division (which truncates) determine the result, and casting converts between int and double.
Data Types Expressions Casting
Key Concept 2
Methods are called on classes and objects through the dot operator
A method is a named block of code identified by its signature (name and parameter types). You call a class (static) method using the class name and the dot operator, such as Math.sqrt(25) or Math.random(). Reading the API and its documentation tells you what parameters a method needs and what it returns — a skill the AP Exam tests directly with provided classes.
Methods Dot Operator Math Class
Key Concept 3
Objects are instances of classes, and Strings are immutable
An object is an instance of a class, created with the new keyword and a constructor. You then call instance methods on that object with the dot operator. The String class is central to Unit 1: a String is immutable, is concatenated with +, and has methods like length(), substring(), indexOf(), equals(), and compareTo() — with indices starting at 0.
Objects Instantiation String Methods
Algorithm
A finite sequence of instructions that solves a problem or completes a task.
Basics
Compiler
A program that translates source code so it can run; reports compile-time errors.
Basics
Primitive type
int, double, or boolean; holds a value directly.
Data Types
Reference type
A type whose variable refers to an object (e.g., String).
Data Types
Variable
A named, typed storage location whose value can change.
Data Types
Expression
A combination of values, variables, and operators that evaluates to a value.
Expressions
Operator precedence
The order operators apply: * / % before + −.
Expressions
Integer division
int / int that truncates the quotient toward zero.
Expressions
Remainder (%)
The amount left over after integer division.
Expressions
Casting
Converting a value to another type with (int) or (double).
Casting
Compound assignment
Operators += −= *= /= %= that combine an operation with assignment.
Operators
Increment / decrement
++ adds 1 and −− subtracts 1 from a variable.
Operators
API
Documentation of the classes and methods available to a programmer.
Methods
Method signature
A method’s name plus its parameter types.
Methods
Static (class) method
A method called with the class name, e.g., Math.pow(2, 3).
Methods
Math class
Provides abs, pow, sqrt, and random static methods.
Methods
Object
An instance of a class.
Objects
Constructor
A special method run by new to initialize a new object.
Objects
Instance method
A non-static method called on an object with the dot operator.
Objects
Immutable
Unchangeable; a String’s contents cannot be modified after creation.
Strings
Concatenation
Joining Strings (or a String and another value) with +.
Strings