1/30
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Value
A piece of info used by a program. Every Java value has a type
Type
defines what kind of data a value represents and what operations can be performed on it
Primitive Type
A basic Java type defined by a keyword, such as int, double, char or boolean
Non-primitive type
A type that is not a primitive type, such as String or an array
int
a whole number storing using 32 bits
double
a number that can include a decimal place and is stored using 64 bits
char
one character written with a single quotation marks, such as 'a'
boolean
a value that is either true or false
String
a sequence of characters or text written with double quotation marks, such as "hello"
integer division
Division between two integers that removes the decimal. for example 5 / 2 is 2
Modulus %
returns the remainder from division
String Concatenation
Joining Strings or values together using +
Operator precedence
The order in which Java performs operations
parentheses
Can be used to change the order in which operations are performed
+
Addition or String concatenation
%
remainder after division
=
Assigns a value to a variable
+=
adds a value and stores the new result in the variable
-=
subtracts a value and stores the new result
*=
Multiplies and stores the new result
/=
divides and stores the new result
%=
Finds the remainder and stores the new result
++
Increase a variable by 1
--
Decreases a variable by 1
==
Checks whether two values are equal
!=
Checks whether two values are not equal
>=
Checks whether the left value is greater than or equal to the right value
&&
AND: true only when both conditions are true
| |
OR: true when at least one condition is true
!
NOT: changes true to false or false to true