title: math in java - what does " %" do?
body: <p>I understand that the code is convert miliseconds to seconds, mins and hours, but I dont understand what the " % " does ...
   int seconds = (int) (milliseconds / 1000) <strong>% 60</strong> ;</p>
  
  <p>can someone explain please?</p>
  
  <p>can I do the same action in C++ ?
   thanks !!</p>
  
  <pre><code>             milliseconds = ((System.currentTimeMillis()) - (startTime));
              int seconds = (int) (milliseconds / 1000) % 60 ;
              int minutes = (int) ((milliseconds / (1000*60)) % 60);
              int hours   = (int) ((milliseconds / (1000*60*60)) % 24);
  </code></pre>