AP Computer Science A - Unit 1: Primitive Types

studied byStudied by 18 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 10 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 20 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 5 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 121 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 1 person
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 12 people
Updated ... ago
4.0 Stars(239)
note Note
studied byStudied by 6 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 52733 people
Updated ... ago
4.9 Stars(282)

Explore top flashcards

flashcards Flashcard39 terms
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard69 terms
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
flashcards Flashcard54 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard44 terms
studied byStudied by 5 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard35 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard32 terms
studied byStudied by 72 people
Updated ... ago
4.9 Stars(8)
flashcards Flashcard44 terms
studied byStudied by 126 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard95 terms
studied byStudied by 773 people
Updated ... ago
5.0 Stars(3)