Java Data Types Flashcards
What is a variable?
A storage location in RAM
What 2 things must a variable have?
A name and a data type
What are 3 other words for variable “name”?
1) Identifier
2) Reference
3) Handle
What are we doing when we declare a variable?
Binding the name to a specific memory address
What can you NOT start a variable name with?
Number
What three things can you start a variable name with?
1) Letter
2) Underscore
3) $
What words can you not use for naming variables?
Java Reserved Words
What kind of notation is used for naming variables?
camelBack
What notation is used for naming classes?
TitleCase
Why do we specify data type when declaring variables?
Tells OS how many bytes of memory to allocate and helps interpret data.
How many characters are shared between ASCII and Unicode?
256
Primitive data types are the only things in Java that are not _______. Why?
Objects, because they have no methods.
How many primitive data types are there?
8
How many numeric primitive data types are there?
6
How many bits in a byte data type?
8 (1 byte)