unit 1 - getting started and primitive types

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

Variable

1 / 23

encourage image

There's no tags or description

Looks like no one added any tags here yet for you.

24 Terms

1

Variable

A name associated with a memory location in the computer.

New cards
2

boolean

used to declare a variable that can only have the value true or false.

New cards
3

double

used to declare a variable that is a decimal number like 3.25.

New cards
4

int

used to declare a variable of type integer (a whole number like -3 or 235).

New cards
5

static

means that the field or method exists in the object that defines the class.

New cards
6

compiler

Software that translates the Java source code into the Java class file that can be run.

New cards
7

compiler or syntax error

An error or bug that is found by the compiler like a missing semicolon

New cards
8

Main Method

Where execution starts in a Java program.

New cards
9

Boolean

An expression that is either true or false.

New cards
10

Camel Case

One way to create a variable name by appending several words together and uppercasing the first letter of each word after the first word (myScore).

New cards
11

Casting a Variable

Changing the type of a variable using (type) name.

New cards
12

System.out.println()

Java method that lets us print out a line of output followed by a newline to the user

New cards
13

Declare a Variable

Specifying the type and name for a variable. This sets aside memory for a variable of that type and associates the name with that memory location.

New cards
14

Initializing a Variable

The first time you set the value of a variable.

New cards
15

String literal

Text enclosed by double quotes.

New cards
16

modulo

The % operator which returns the remainder from one number divide by another.

New cards
17

Operator

Common mathematical symbols such as + for addition and * for multiplication.

New cards
18

Shortcut or compound assignment operators

Operators like x++ or x+= 1 which mean x = x + 1

New cards
19

assignment statements

initialize or change the value stored in a variable using the assignment operator =.

New cards
20

data type

determines the size of memory reserved for a variable, for example int, double, boolean, String.

New cards
21

ArithmeticException

If you divide by zero, you will get this error.

New cards
22

operator precedence

Some operators are done before others, for example *, /, % have precedence over + and -, unless parentheses are used.

New cards
23

arithmetic expression

a sequence of operands and operators that describe a calculation to be performed, for example 3*(2 + x)

New cards
24

increment operator

The operator (++) that increases the value of a numerical variable by one.

New cards

Explore top notes

note Note
studied byStudied by 1 person
... ago
5.0(1)
note Note
studied byStudied by 11 people
... ago
5.0(1)
note Note
studied byStudied by 2 people
... ago
5.0(1)
note Note
studied byStudied by 43 people
... ago
5.0(1)
note Note
studied byStudied by 71 people
... ago
5.0(1)
note Note
studied byStudied by 3 people
... ago
5.0(1)
note Note
studied byStudied by 42 people
... ago
5.0(2)
note Note
studied byStudied by 12 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (55)
studied byStudied by 16 people
... ago
5.0(2)
flashcards Flashcard (61)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (51)
studied byStudied by 30 people
... ago
5.0(1)
flashcards Flashcard (128)
studied byStudied by 3 people
... ago
5.0(1)
flashcards Flashcard (68)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (27)
studied byStudied by 16 people
... ago
5.0(1)
flashcards Flashcard (222)
studied byStudied by 23 people
... ago
5.0(1)
robot