Chapter 2.2 : Variables and the Primitive Types Flashcards
According to the syntax rules of java, a name is a sequence of _______.
characters
Identifiers dont allow _______.
spaces
What are the names called in Java that cannot be used by programmers for any other purposes?
reserved names
Ex. class, public, static, if, else, while, etc
What character set is used in Java?
Unicode
What are compound names?
several ordinary names separated by periods which is a path to an item through one or more levels of containment
Names are used to refer to data instead of _______.
numbers
What is a variable?
A name that refers to data stored in memory
What is an assignment statement?
the only way to get data into a variable.
Ex. variable=expression;
How many types of data can one variable hold?
One
What are the 8 primitive types of data in Java?
- byte
- short
- int
- long
- float
- double
- char
- boolean
What two logical values does a boolean hold?
True or False
What does a char variable hold?
a single character from Unicode character set
What do the float and double types of variables hold?
real numbers such as 3.6 and -145.99
Any data value stored in the computer’s memory must be represented as a _______.
binary number
A single 0 or 1 is referred to as a_____?
bit