Unit 1 vocab Flashcards
(24 cards)
compiler
Software that translates the Java source code into the Java class file which can be run on the computer.
Compiler or syntax error
An error that is found during the compilation.
Main method
Where execution starts in a Java program.
Variable
A name associated with a memory location in the computer.
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.
Initializing a Variable
The first time you set the value of a variable.
data type
determines the size of memory reserved for a variable, for example int, double, boolean, String.
integer
a whole number like 2 or -3
boolean
An expression that is either true or false.
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).
Casting a Variable
Changing the type of a variable using (type) name.
Operator
Common mathematical symbols such as + for addition and * for multiplication.
Compound assignment or shortcut operators
Operators like x++ which means x = x + 1 or x *=y which means x = x * y.
modulo
The % operator which returns the remainder from one number divide by another.
arithmetic expression
a sequence of operands and operators that describe a calculation to be performed, for example 3*(2 + x)
operator precedence
some operators are done before others, for example *, /, % have precedence over + and -, unless parentheses are used.
boolean
used to declare a variable that can only have the value true or false.
double
used to declare a variable of type double (a decimal number like 3.25).
int
used to declare a variable of type integer (a whole number like -3 or 235).
String
used to declare a variable of type String which is a sequence of characters or text.
System.out.print()
used to print output to the user
System.out.println()
used to print output followed by a newline to the user
=
- used for assignment to a variable
+, -, *, /, %
aritmetic operators