I have to get last numbers from a variable and I do not know how to do it. I'm getting the milliseconds and I need to play this variable lol
, where I need to return only the last 4 digits of lol
not whole integer.
package trabalho01;
import java.util.Calendar;
public class aleatorio {
public int aleatoriar() {
Calendar lCDateTime = Calendar.getInstance();
int lol = (int) (lCDateTime.getTimeInMillis());
return lol;
}
}