fork(1) download
  1. import java.util.Calendar;
  2.  
  3. class Ideone {
  4. public static void main(String[] args) {
  5. System.out.println(aleatoriar());
  6. }
  7. public static int aleatoriar() {
  8. Calendar lCDateTime = Calendar.getInstance();
  9. return (int)(lCDateTime.getTimeInMillis() % 10000);
  10. }
  11. }
Success #stdin #stdout 0.08s 380480KB
stdin
Standard input is empty
stdout
6743