AP Computer Science A - Unit 1: Primitive Types

studied byStudied by 28 people
0.0(0)
Get a hint
Hint

Java

1 / 20

21 Terms

1

Java

A high-level, class-based, object-oriented programming language known for its platform independence.

New cards
2

Pascal case

A naming convention where each word in a compound word is capitalized, and there are no spaces between words.

New cards
3

System.out.println

A Java statement used to print output to the console.

New cards
4

String literal

Specific text or numbers enclosed in double quotation marks.

New cards
5

Variable

A named storage location in a computer's memory used to hold data that can be manipulated during program execution.

New cards
6

Local variable

A variable declared inside a method and is only accessible within that method.

New cards
7

Camel case

A naming convention where the first letter of each word is capitalized except for the first word, and there are no spaces between words.

New cards
8

Primitive data types

Basic data types built into Java, including byte, short, int, long, float, double, boolean, and char.

New cards
9

Casting

Converting a value from one data type to another in Java.

New cards
10

Simple assignment operator

The equal sign (=) used to assign a value to a variable.

New cards
11

Arithmetic operators

Symbols such as +, -, *, / used to perform mathematical operations in Java.

New cards
12

Arithmetic Operator

Symbols used in programming to perform mathematical operations on variables or values, such as addition (+), subtraction (-), multiplication (*), division (/), and modulus (mod).

New cards
13

Modulus Operator

An operator (%) used to find the remainder of a division operation between two numbers.

New cards
14

Unary Operators

Operators that act on a single operand, such as increment (++) and decrement (--), providing shortcuts for operations like adding or subtracting 1.

New cards
15

Division (int vs

Different behaviors of division based on the data types involved, where int division truncates decimal points, while double division retains decimal precision.

New cards
16

Operator Precedence

The order in which operators are evaluated in an expression, with some operators having higher precedence than others, and the use of parentheses to control the order of operations.

New cards
17

Widening

The process of converting a smaller data type to a larger data type, such as converting an int to a double, to add precision. Widening can happen automatically.

New cards
18

Narrowing

The process of converting a larger data type to a smaller data type, such as converting a double to an int. Narrowing must be done manually to avoid data loss.

New cards
19

Overflow

Occurs when a value exceeds the maximum limit that a data type can hold, leading to unexpected behavior like rolling over to the minimum value or causing errors.

New cards
20

Casting

The explicit conversion of a data type to another data type, done manually to ensure data is handled correctly, especially when narrowing is involved.

New cards
21
New cards

Explore top notes

note Note
studied byStudied by 17 people
... ago
5.0(1)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 182 people
... ago
5.0(2)
note Note
studied byStudied by 12 people
... ago
5.0(1)
note Note
studied byStudied by 24 people
... ago
4.0(2)
note Note
studied byStudied by 5 people
... ago
5.0(2)
note Note
studied byStudied by 1 person
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (138)
studied byStudied by 68 people
... ago
5.0(1)
flashcards Flashcard (88)
studied byStudied by 17 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 5 people
... ago
5.0(1)
flashcards Flashcard (67)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (89)
studied byStudied by 79 people
... ago
5.0(1)
flashcards Flashcard (27)
studied byStudied by 1 person
... ago
5.0(1)
flashcards Flashcard (103)
studied byStudied by 24 people
... ago
5.0(1)
flashcards Flashcard (28)
studied byStudied by 51 people
... ago
4.0(1)
robot