Results 1 to 5 of 5
  1. #1
    satimis is offline Member
    Join Date
    Apr 2010
    Posts
    22
    Rep Power
    0

    Default Java interaction (RESOLVED)

    Hi folks,

    Could you please helping me to understand;

    Why
    > 9%4
    1

    > 1974%4
    2

    > 2000%4
    0


    TIA

    B.R.
    satimis
    Last edited by satimis; 06-30-2010 at 05:15 PM. Reason: RESOLVED

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    6

    Default

    It's called modulo. 9%4 means 9/4 = 2 => 9- (4*2) = 1
    2000%4 is 2000/4 = 500 => 2000 - (4*500) = 0
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  3. #3
    satimis is offline Member
    Join Date
    Apr 2010
    Posts
    22
    Rep Power
    0

    Default

    Quote Originally Posted by PhHein View Post
    It's called modulo. 9%4 means 9/4 = 2 => 9- (4*2) = 1
    2000%4 is 2000/4 = 500 => 2000 - (4*500) = 0
    Hi,

    According to your advice would it be;
    Java Code:
    1974/4 = 493 => 1974-(493*4)=2
    ???

    Thanks

    B.R.
    satimis

  4. #4
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    6

    Default

    Yes, that's it.
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  5. #5
    satimis is offline Member
    Join Date
    Apr 2010
    Posts
    22
    Rep Power
    0

    Default Resolved

    Quote Originally Posted by PhHein View Post
    Yes, that's it.
    Thanks

    B.R.
    satimis

Similar Threads

  1. Interaction with File System
    By Italian_Programmer in forum AWT / Swing
    Replies: 2
    Last Post: 03-08-2010, 10:11 AM
  2. Replies: 5
    Last Post: 01-10-2010, 02:47 PM
  3. Basic Class Interaction Question
    By McChill in forum New To Java
    Replies: 1
    Last Post: 05-09-2009, 11:41 PM
  4. program interaction possible?
    By Pierced1 in forum Advanced Java
    Replies: 3
    Last Post: 02-19-2009, 12:54 AM
  5. Object Interaction
    By Jinxes in forum New To Java
    Replies: 1
    Last Post: 12-03-2007, 12:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •