Android examples for java.util:Random
random Number In Range
//package com.java2s; import java.util.Random; public class Main { public static int randomNumberInRange(Random random, int minX, int maxX) { return minX + random.nextInt(maxX - minX + 1); }// w w w . jav a2 s. com }