1 - Integer Arithmetic

Get an introduction to or review of integer arithmetic in Java programming.

Code HuntJava
1.0x

1 - Integer Arithmetic

Created 3 years ago

Duration 0:06:18
lesson view count 190
Get an introduction to or review of integer arithmetic in Java programming.
Select the file type you wish to download
Slide Content
Tags: Code Hunt Java
  1. Integer Arithmetic

    Slide 2 - Integer Arithmetic

  2. Simple arithmetic

    Slide 3 - Simple arithmetic

    • All four basic arithmetic operations exist in programming languages
    • Addition, subtraction, and multiplication all work exactly as expected:
  3. Integer division

    Slide 4 - Integer division

    • When working with integers, division returns only the whole number part of the result (the quotient):
  4. Modulo (remainder) operator

    Slide 5 - Modulo (remainder) operator

    • Programming also includes a fifth operator, called the modulo operator (%), which returns the remainder of dividing its two operands:
  5. Order of operations

    Slide 6 - Order of operations

    • The usual order of operations of observed with modulo performed along with multiplication and division:
    • You can use parentheses to override the normal order of operations:
  6. Check your understanding

    Slide 7 - Check your understanding

  7. Check your understanding

    Slide 8 - Check your understanding

  8. Check your understanding

    Slide 9 - Check your understanding

  9. Check your understanding

    Slide 10 - Check your understanding

  10. Practice #1

    Slide 11 - Practice #1

  11. Practice #2

    Slide 12 - Practice #2

  12. Practice #3

    Slide 13 - Practice #3

  13. Practice #4

    Slide 14 - Practice #4

  14. Practice #5

    Slide 15 - Practice #5