Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
31 Cards in this Set
- Front
- Back
___ operators always result in a boolean value (true or false)
|
relational
|
|
there are six relational operators: >, >=, <, <=, ==, and !=. The last two (== and !=) are sometimes referred to as ___ operators
|
equality
|
|
when comparing characters, Java uses the ___ value of the character as the numerical value
|
Unicode
|
|
equality operators
|
there are two equality operators: == and !=
four types of things can be tested: numbers, characters, booleans, and reference variables |
|
when comparing reference variables, == returns true only if ___
|
both references refer to the same object
|
|
___ is for reference variables only, and checks for whether the object is of a particular type
|
instanceof
|
|
the ___ operator can be used only to test objects (or null) against class types that are in the same class hierarchy
|
instanceof
|
|
for interfaces, an object passes the instanceof test if any of its superclasses implement the interface on the ___ side of the instanceof operator
|
right
|
|
there are four primary math operators: ___ ___ ___ ___
|
add, subtract, multiply, and divide
|
|
the ___, returns the remainder of a division
|
remainder operator (%)
|
|
expressions are evaluated from ___, unless you add parentheses, or unless some operators in the expression have higher precendence than others
|
left to right
|
|
the *, /, % operators have ___ precendence than + and -
|
higher
|
|
if either operand is a ___, the + operator concatenates the operands
|
String
|
|
if both operands are ___, the + operator adds the operands
|
numeric
|
|
prefix operators (++ and --) run before/after the value is used in the expression
|
before
|
|
postfix operators (++ and --) run before/after the value is used in the expression
|
after
|
|
in any expression, both operands are ___ ___ before the operator is applied
|
fully evaluated
|
|
variables marked ___ cannot be incremented or decremented
|
final
|
|
returns one of two values based on whether a boolean expression is true
|
ternary
|
|
returns the value after the ? if the expression is true
|
ternary
|
|
returns the value after the : if the expression is false
|
ternary
|
|
the exam covers six "logical" operators
|
&, |, ^, !, &&, and ||
|
|
logical operators work with two expressions (except for !) that must resolve to ___ values
|
boolean
|
|
the && and & operators return true only if ___
|
both operands are true
|
|
the || and | operators return true if ___
|
either or both operands are true
|
|
the ___ and ___ operators are known as short-circuit operators
|
&& and ||
|
|
the && operator does not evaluate the right operand if the left operand is ___
|
false
|
|
the || operator does not evaluate the right operand if the left operand is ___
|
true
|
|
the & and | operators ___
|
always evaluate both operands
|
|
the ^ operator (called the "logical XOR"), returns true if ___
|
exactly one operand is true
|
|
the ! operator (called the "inversion" operator), returns ___
|
the opposite value of the boolean operand it precedes
|