2 Replies Latest reply: May 28, 2008 1:46 PM by 807601 RSS

    convert long to int

      I'm trying to convert a long to an int by doing:

      int time = (int)runTime;

      But when doing so I receive an error stating

      Inconvertible Types
      found : java.lang.Long
      required: int

      The number that is in the runTime variable, is small enough to fit into an int. It is returning the time in milliseconds between two times. The milliseconds will be less than 1 hour, so the number will fit into an int. However, I'm not sure how to convert it.