Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: Modulus Operator Example

Java: Modulus Operator Example
{filelink=4589}

public class Modulo {
  public static void main(String[] args) {
    int i = 100;
    double d = 2;
    System.out.println("i mod 10 = " + i % 6);
    System.out.println("d mod 10 = " + d % 10);
  }
}
/*
i mod 10 = 4
d mod 10 = 2.0
*/

Users who found this page were searching for:

  • perl Tie::Hash::Regex dbm
  • joining multicast group java
  • python dictionary get key or default
  • python delete local ip
  • python remove directory fast

No comments yet.

Leave a Comment