Notes for chapter 9B Expressions and Arithmetic Operators _________

  1. What are some operators in Java? _______________________________
  2. In the equation:
    -23 - 3
    Which number is negated? ____
    Which number is subtracted? _____
  3. Which of these equations are correct? (Put a check mark next to expressions that are correct)
    Expression Correct or Not Correct? Expression Corrector Not Correct?
    25   25 - value  
    2( a - b )   (a-b) * (c-d)  
    A - b/c + D   -sum + partial  
    ( (x+y) / z ) / ( a - b )   ( (m - n) + (w-x-z) / (p % q )  
  4. What other kind of expression is there other than numeric expressions? ________________________
  5. Skip ahead to Wierd integer arithmetic.
    QUESTION 6: What is the result of evaluating the following expression: 199/50 _____________________
  6. QUESTION 7: What is the result of evaluating the following expression: 1/2 + 1/2 __________________
  7. QUESTION 8: What is the value of the expression 99/100 ? _______________
  8. Read through the rest of the chapter until you get to Practice with Remainder Operator
    For positive numbers, INT % X means to fit as many X as you can into INT, and then the left over amount is the value of the expression. Try that with the following:
    Expression Result Expression Result
    7 % 3 7 % 5
    10 % 5 10 % 6
    129 % 100 1999 % 100
    17 % 2 18% 2
  9. QUESTION 16: If X is odd, what is X%2? _________ because ___________________________________________

Don't worry about the remainder of the chapter for now.