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

Using Objects and Methods

Your foundation in Java. Learn variables and data types, build expressions and produce output, cast between types, read documentation and the API, and call methods on the Math and String classes — then create and use your first objects.

15 topics
15–25% of the exam
~32–34 class periods
College Board aligned
← Back to AP Computer Science A

Choose your study tool

Six ways to master Unit 1 — pick whichever fits how you like to study.

Flashcards
24 interactive flashcards covering data types, operators, casting, method calls, and the Math and String classes. Tap to flip.
Open flashcards →
Cheat Sheet
A one-page visual summary of Unit 1 — every type, operator, and method call on a single screen.
Open cheat sheet →
Essentials
The core concepts plus a searchable glossary of every vocabulary term you need to know for the exam.
Open essentials →
Visual Review
A slide-by-slide walkthrough of Unit 1 with data types, operator precedence, and object creation.
Open visual review →
MCQ Practice
35 multiple-choice questions in College Board exam style — with full explanations of every answer.
Start practice →
FRQ Practice
A free-response question with model answers showing exactly how each part earns its point on the exam.
Start FRQ →

Topics in Unit 1

All 15 topics from the College Board CED, in order.

Topic 1.1
Algorithms, Programming & Compilers
What algorithms and programs are, and how source code compiles and runs.
Topic 1.2
Variables and Data Types
The primitive types int, double, and boolean, and reference types.
Topic 1.3
Expressions and Output
Arithmetic operators, precedence, and printing with System.out.
Topic 1.4
Assignment Statements and Input
The = operator and reading input with a Scanner.
Topic 1.5
Casting and Range of Variables
Converting between int and double, and integer overflow.
Topic 1.6
Compound Assignment Operators
+=, -=, *=, /=, %=, and ++ / -- operators.
Topic 1.7
API and Libraries
Using the Application Program Interface and imported libraries.
Topic 1.8
Documentation with Comments
Line, block, and Javadoc comments; preconditions and postconditions.
Topic 1.9
Method Signatures
Method names, parameter lists, and return types.
Topic 1.10
Calling Class Methods
Static methods called with the class name and dot operator.
Topic 1.11
Math Class
Math.abs, Math.pow, Math.sqrt, and Math.random.
Topic 1.12
Objects: Instances of Classes
Objects as instances of reference-type classes.
Topic 1.13
Object Creation (Instantiation)
Using new and constructors to create objects.
Topic 1.14
Calling Instance Methods
Calling non-static methods on an object with the dot operator.
Topic 1.15
String Manipulation
Immutable String objects, concatenation, and String methods.

About Unit 1

Unit 1 introduces the Java programming language and gives you the foundation every later unit builds on. You start with what an algorithm and a program are and how source code is compiled and run. Then you learn the three primitive data types — int, double, and boolean — declare variables, build expressions with arithmetic operators (respecting operator precedence), and produce output with System.out.print and println.

You’ll cast between int and double, use compound assignment and increment/decrement operators, read the API and documentation, and understand method signatures (name, parameters, return type). Finally you begin object-oriented programming: calling class (static) methods like those in the Math class, creating objects with new and constructors, calling instance methods, and manipulating immutable String objects.

On the exam this unit is 15–25% of the multiple-choice section and takes about 32–34 class periods. The five computational thinking practices below run through every topic:

Practice 1
Design Code
Practice 2
Develop Code
Practice 3
Analyze Code
Practice 4
Document Code
Practice 5
Use Computers Responsibly
Up next
Unit 2: Selection and Iteration
Start Unit 2 →