title: Random Number with Java in Android Studio
body: <p>i'm try to make a random or unique code to payment method, for example the user must pay for Rp. 10.000 and then the user checkout and the system give the total payment with unique code in last three number. </p>
  
  <p>For example user should pay for Rp. 10.000 and then the system showing Rp. 10.123
  for other example, user pay for 1.000.000 and then system showing the total is 1.000.562 just unique or random in last three number</p>
  
  <p>how i can make like this in java for android ?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>i've been try this code</p>
  
  <pre><code>int someNumber = 10.000;
  int lastThree = someNumber % 1000;
  </code></pre>
  
  <p>but when the last 3 number is '0' it return 0, when i'm change the last 3 number like 10.234 it return into 234, now how i can get the last three number when the value is like 10.000</p>