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