AP CSA Unit 1 Notes: Building Programs with Variables, Types, and Expressions in Java

0.0(0)
Studied by 0 people
0%Unit 1 Mastery
0%Exam Mastery
Build your Mastery score
multiple choiceMultiple Choice
call kaiCall Kai
Supplemental Materials
Card Sorting

1/24

Last updated 3:08 PM on 3/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

25 Terms

1
New cards

Programming

The process of writing precise, step-by-step instructions that a computer can follow to solve problems.

2
New cards

Strong typing

A language feature (like in Java) that requires variables to have explicit data types, reducing ambiguity about what values can be stored and used.

3
New cards

Java Virtual Machine (JVM)

The system that runs Java bytecode, helping Java programs behave consistently across different computers.

4
New cards

Variable

A named storage location in memory that holds a value which can be used, updated, and combined with other values.

5
New cards

Primitive type

A built-in basic data type that stores a simple value directly (e.g., int, double, boolean, char).

6
New cards

Reference type

A type whose variables store a reference to an object rather than the entire value directly (e.g., String).

7
New cards

Declaration

A statement that creates a variable by specifying its type and name (e.g., int score;).

8
New cards

Initialization

Assigning a variable its first value (often done at the same time as declaration).

9
New cards

Constant (final)

A variable marked with final whose value should not change after initialization (often written in ALLCAPSWITH_UNDERSCORES).

10
New cards

int

A primitive type that stores whole numbers (negative, zero, or positive); commonly used for counting and indexing.

11
New cards

double

A primitive type that stores decimal numbers as floating-point approximations (not all decimals are stored exactly).

12
New cards

boolean

A primitive type that stores one of two values: true or false; used for logical results and conditions.

13
New cards

char

A primitive type that stores a single Unicode character written in single quotes (e.g., 'A'); not the same as String.

14
New cards

Expression

Code that produces a value (such as a number, boolean, or character), e.g., 4 + 5 or count > 10.

15
New cards

Assignment statement

A statement that stores the value of the right-hand expression into the left-hand variable using = (e.g., x = x + 3;).

16
New cards

Operator precedence

Rules that determine the order operations are evaluated (e.g., *, /, % before +, -; parentheses override).

17
New cards

Integer division

Division where both operands are integers, causing the decimal part to be discarded (truncated toward zero), e.g., 7/2 becomes 3.

18
New cards

Modulus operator (%)

An operator that returns the remainder after division (e.g., 27 % 10 is 7); often used for even/odd checks and last digits.

19
New cards

String concatenation

Using + to join strings; if either operand is a String, Java converts the other to a string and combines them, evaluated left to right.

20
New cards

Overflow

When a calculation exceeds a numeric type’s range; for Java integers, the value wraps around rather than producing an error.

21
New cards

Casting

Converting a value from one type to another (e.g., (int) 19.99 becomes 19), which can lose information.

22
New cards

Widening conversion (implicit cast)

An automatic conversion from a narrower type to a wider type (e.g., int to double), often occurring in mixed-type arithmetic.

23
New cards

Narrowing conversion (explicit cast)

A conversion from a wider type to a narrower type that requires a cast (e.g., double to int) and may drop decimals or cause wraparound.

24
New cards

Compound assignment operator

A shortened update form like +=, -=, *=, /=, %= that combines an operation with assignment; can include an implicit cast to the left variable’s type.

25
New cards

Prefix vs. postfix increment

With ++ in an expression: postfix (x++) evaluates to the old value then increments; prefix (++x) increments first then evaluates to the new value.

Explore top notes

note
Invisible Man Chapter 1
Updated 1173d ago
0.0(0)
note
Media & Information Literacy
Updated 322d ago
0.0(0)
note
Invisible Man Chapter 7
Updated 1173d ago
0.0(0)
note
Unit 3 : Macromolecules
Updated 313d ago
0.0(0)
note
International Cooperation
Updated 1195d ago
0.0(0)
note
Biochimie
Updated 746d ago
0.0(0)
note
Invisible Man Chapter 1
Updated 1173d ago
0.0(0)
note
Media & Information Literacy
Updated 322d ago
0.0(0)
note
Invisible Man Chapter 7
Updated 1173d ago
0.0(0)
note
Unit 3 : Macromolecules
Updated 313d ago
0.0(0)
note
International Cooperation
Updated 1195d ago
0.0(0)
note
Biochimie
Updated 746d ago
0.0(0)

Explore top flashcards

flashcards
S.S. Unit 3 - Study Guide
57
Updated 126d ago
0.0(0)
flashcards
Chapter 27
120
Updated 705d ago
0.0(0)
flashcards
Lit Words: 2 The Boogaloo
24
Updated 496d ago
0.0(0)
flashcards
Lab Practical 3
75
Updated 755d ago
0.0(0)
flashcards
Polyatomic Ions
21
Updated 768d ago
0.0(0)
flashcards
Latin Week 5
26
Updated 920d ago
0.0(0)
flashcards
Connect 4, Unit 3
52
Updated 1011d ago
0.0(0)
flashcards
S.S. Unit 3 - Study Guide
57
Updated 126d ago
0.0(0)
flashcards
Chapter 27
120
Updated 705d ago
0.0(0)
flashcards
Lit Words: 2 The Boogaloo
24
Updated 496d ago
0.0(0)
flashcards
Lab Practical 3
75
Updated 755d ago
0.0(0)
flashcards
Polyatomic Ions
21
Updated 768d ago
0.0(0)
flashcards
Latin Week 5
26
Updated 920d ago
0.0(0)
flashcards
Connect 4, Unit 3
52
Updated 1011d ago
0.0(0)