generate random numbers  [ 698 views ]

Goal: we need this 🙂

We need to know about this. How we can generate a random number between minimum and a maximum value.

  int min = 0;
  int max = 120;

  Random r = new Random();
  int ret = r.nextInt(max - min + 1) + min;
#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }