3
I have to get last numbers from a variable and I don’t know how to do it. I’m taking the milliseconds and I need to play in this variable lol
, where I need you to return only the last 4 digits of lol
not her whole.
package trabalho01;
import java.util.Calendar;
public class aleatorio {
public int aleatoriar() {
Calendar lCDateTime = Calendar.getInstance();
int lol = (int) (lCDateTime.getTimeInMillis());
return lol;
}
}
Has the answer helped you in any way? You know how the website? Do you know that you can accept an answer that solves your problem? And you can vote for anything useful to you at website. See the[tour].
– Maniero