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;
25 Cards in this Set
- Front
- Back
There are some general guidelines to consider when creating arithmetic expressions. What are those? |
1.Use parentheses to alter precedence. 2.Consider the size of resulting values and possible loss of precision. 3. Apply arithmetic operators’ precedence level. 4.When using negative numbers with modulus calculation, drop the negative signs from either operand and calculate the result. The sign of the left operand is the sign of the result. 5.The (+) operator can be used to add numbers and String objects. 6.Dividing integer by zero results in the throwing of ArithmeticException |
|
+, -, ++, -- |
Unary arithmetic operators |
|
What is this operator ~ called? |
Bitwise inversion (unary) (Bitwise operators slide10) |
|
often used with relational operators to construct more complex decision-making expressions. |
logical operators |
|
compares two values and determines the relationship between them. |
relational operators |
|
What are the java operators? |
1. Unary Arithmetic Operators 2. Binary Arithmetic Operators 3. Bitwise Operators 4. Shift Operators 5. Relational and Logical Operators 6. Cast Operator 7. Assignment Operator 8. Ternary Operator |
|
shift bits of op1 left by distance op2 |
<< Shift operators |
|
works on integer values, by manipulating its bit-pattern equivalent. |
bitwise operators |
|
Increment and decrement operators have two formats. What are those? |
postfix and prefix. |
|
this operator | is called? |
bitwise OR (Bitwise operators side 10) |
|
shift bits of op1 right by distance op2 |
>> (Shift operators slide 11) |
|
& |
bitwise AND |
|
this operator | is called? |
bitwise OR (Bitwise operators side 10) |
|
& |
bitwise AND |
|
shift bits of op1 right by distance op2 |
>> (Shift operators slide 11) |
|
Used to assign values to a variable - Shorthand operator if combined with other operators |
assignment operators |
|
shift bits of op1 right by distance op2 |
>> (Shift operators slide 11) |
|
used in converting (casting) one type into another type or an object into another object. |
cast operators Syntax: (Cast type) Value; |
|
an operator that deals with three operands. |
Ternary operator Syntax: variable = condition ? value : value; |
|
shift bits of op1 right by distance op2 (unsigned) |
>>> Shift operators |
|
performs bit manipulation on data by shifting the bits of its first operand right or left. |
shift operators |
|
shift bits of op1 left by distance op2 |
<< Shift operators |
|
^ |
bitwise EX-OR |
|
Addition, subtraction, multiplication, division, modulo division. |
binary arithmetic operations |
|
this operator | is called? |
bitwise OR (Bitwise operators side 10) |