Get Random Index : Random « Development « Android






Get Random Index

    
import android.graphics.Paint;

class Main {
  public static int GetRandomIndex(int min, int max)
  {
    return (int) (Math.random() * (max - min + 1)) + min;
  }

}

   
    
    
    
  








Related examples in the same category

1.Random Alphabet Maker
2.Next random Int
3.Random Xor Obfuscator
4.returns a random number among { 0 to count-1 }
5.Random Generator