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.
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
how i can make like this in java for android ?
UPDATE
i've been try this code
int someNumber = 10.000;
int lastThree = someNumber % 1000;
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