Java ME modulo method ??

Discussion in 'Java' started by 900390d@acadiau.ca, May 19, 2004.

  1. Guest

    Easy question, is there an equivalent for the % or modulo method for
    integers in the CLDC API? and if so, what is it?

    Thanks in advance,
    Scott
     
    , May 19, 2004
    #1
    1. Advertising

  2. wrote:

    > Easy question, is there an equivalent for the % or modulo method for
    > integers in the CLDC API? and if so, what is it?


    Use %. You can do integer math, just not floating point math, with the CLDC
    1.0. CLDC 1.1 re-introduces floating points.

    --
    /**
    * @author Darryl L. Pierce <>
    * @see The J2ME FAQ <http://mypage.org/mcpierce/j2mefaq.html>
    * @quote "What do you care what others think, Mr. Feynman?"
    * @geek echo '$_ = "Jvtu bopuifs Pfsm ibdlfs."; y/a-z/za-y/; print' |
    perl
    */
     
    Darryl L. Pierce, May 20, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christian Kruggel

    General modulo-question

    Christian Kruggel, Jul 7, 2003, in forum: Java
    Replies:
    1
    Views:
    475
    Brad BARCLAY
    Jul 7, 2003
  2. Tjerk Wolterink

    [xsl] sort & modulo

    Tjerk Wolterink, Apr 21, 2005, in forum: XML
    Replies:
    3
    Views:
    589
    Dimitre Novatchev
    Apr 22, 2005
  3. silentlights

    Fast Division/Modulo Operation

    silentlights, Apr 16, 2004, in forum: C Programming
    Replies:
    8
    Views:
    1,013
    Dik T. Winter
    Apr 23, 2004
  4. Griff

    Problems using modulo

    Griff, Apr 19, 2004, in forum: Python
    Replies:
    5
    Views:
    416
    Diez B. Roggisch
    Apr 20, 2004
  5. Griff

    Problems using modulo

    Griff, Apr 19, 2004, in forum: Python
    Replies:
    0
    Views:
    303
    Griff
    Apr 19, 2004
Loading...

Share This Page