test2 Flashcards
curly braces or the _____ _____ _____ can control the scope of a vriable
SCOPE INDEX OPERATORS
what is a variable?
a storage location in a computer’s ram memory
a variable has a ____ and a ____ ____ specified
name (identifier, reference, handle) and data type(int,String)
what do we do when we declare a variable
we specify its data type and name
what is the assignment operator
=
When we declare a variable, we’re ______ the name of the variable to a particular memory location address
binding
How must a Java variable identifier must start with
a letter, and underscore or a $ sign
True or false: You cannot start a variable name with a digit such as 3 or 7.
True it causes a compile error
is java case sensitive?
yes
can you use java reserved words or keywords such as public, class or else identifiers?
nope compile error
java names begin with a ____
lower case letter
how is the second word in a variable name written out
with a capital letter, camelBack
true or false. in java our programs statements are always contained inside a class file
true
class names always start with a
capital letter and each new word also starts with a capital letter
variable names start with a \_\_\_\_ case letter class names start with a \_\_\_\_ case letter
lower (camelBack)
upper (title case)
why do we specify the data type when we declare a variable?
tells os how many bytes of memory is needed for that variable and BC program uses data type to interpret the data that is stored
True or false: ASCII and Unicode: first 256 values are identical
true
do primitive data types have methods associated with them?
nope
how many primitive data types are there in java
8
what is mantissa and exponent
mantissa is the first part of an exponent the number that is going to be multiplied by 10 to the exponent. exponent is what it is
is a string an object
yes
what is a method in java
a method is some lines of code that are put in their own code block (inside their own curly braces) and this block is given a method name
T or F: Var keyword only be used when created local variables within a method
True
how are constants declared
with the keyword final along with its data type that it will hold