zuai-logo
zuai-logo
  1. AP Computer Science A
FlashcardFlashcardStudy GuideStudy GuideQuestion BankQuestion BankGlossaryGlossary

Glossary

A

Assignment Operator (=)

Criticality: 3

Evaluates the expression on the right side and stores the resulting value into the variable on the left side.

Example:

In int score = 100;, the value 100 is assigned to the variable score.

D

Decrementing (--)

Criticality: 2

A shorthand unary operator (`--`) used to decrease the value of a numeric variable by 1.

Example:

If lives is 3, then lives--; makes lives become 2.

Double Division

Criticality: 2

Division where at least one of the operands is a `double` (or float), resulting in a `double` value that includes the decimal part.

Example:

double average = 7.0 / 2; will store 3.5 in average, preserving the decimal.

I

Incrementing (++)

Criticality: 2

A shorthand unary operator (`++`) used to increase the value of a numeric variable by 1.

Example:

If count is 5, then count++; makes count become 6.

Integer Division

Criticality: 3

Division performed between two integer operands, where the result is always an integer with any fractional part truncated (removed).

Example:

int result = 7 / 2; will store 3 in result, not 3.5, because the decimal is truncated.

M

Modulo Operator (%)

Criticality: 3

An arithmetic operator (`%`) that calculates and returns the remainder of an integer division.

Example:

int remainder = 10 % 3; will store 1 in remainder because 10 divided by 3 is 3 with a remainder of 1.

O

Order of Operations (PEMDAS/BODMAS)

Criticality: 3

The set of rules that dictates the sequence in which mathematical operations are performed in an expression (Parentheses, Exponents, Multiplication/Division/Modulo, Addition/Subtraction).

Example:

In 2 + 3 * 4, multiplication is done first, so the result is 14, not 20, following the order of operations.

d

double (data type)

Criticality: 3

A primitive data type in Java used to store floating-point numbers, which can have decimal parts, providing higher precision than `float`.

Example:

double price = 19.99; declares a double variable price to store a value with decimals.

i

int (data type)

Criticality: 3

A primitive data type in Java used to store whole numbers (integers) without any fractional or decimal part.

Example:

int age = 17; declares an integer variable age and initializes it to 17.