Finals Study Flashcards
(42 cards)
How many bits in a byte
8 bits
Name 2 character encoding standards
ASCII and Unicode
How many characters can ASCII handle
256 characters
How many characters can Unicode handle
65,536 characters (256^2)
What is a byte’s address
the numbered location where the byte resides
what kind of code can a CPU execute
machine code
is machine code a low or high level language
machine code is considered “low-level” language
what is an algorithm
a finite sequence of instructions for solving a problem or performing a task
How are algorithms typically expressed
in English of pseudocode
how to create a new scanner
Scanner keyboard = new Scanner(System.in);
name the primitive data types:
int, double, boolean, char, float, long, short
is java case sensitive
yes
what are the arithmetic operators
+, -, *, /
what is an example of an assignment variable
=
what are the compound assignment operators
+=, -=, *=, /=, %=
what is a conditional ternary operator
?
incrementing/ decrementing operators
++, –
what are the logical operators
!, &&, ||
what are the relational operators
<=, >=, ==. !=, <, >
do switch statements require a default statement
nope
how do conditional ternary operators work
condition ? implement if true : implement if false
what CANNOT a controlling expression be in a switch statement
a floating point number or a range
anything you can do with a for loop, you can do for a while loop and…
vice versa applies as well
are instance variables usually set as public or private
private