Here you can find the source of getRandomView(int size)
public static int getRandomView(int size)
//package com.java2s; import java.util.Random; public class Main { public static int getRandomView(int size) { Random rd = new Random(); int randomInt = rd.nextInt(size); return randomInt; }/* w w w. j av a 2s .c o m*/ }