I have this code for generating a random number... public static int randInt(int min, int max) { Random rand = new Random(); int randomNum = rand.nextInt((max - m
Solution 1:
because in your case
(max - min) + 1
goes less than one
01-11 00:46:31.500: E/AndroidRuntime(1105): java.lang.IllegalArgumentException: n <= 0: 0
Share
Post a Comment
for "Getting An Illegalargumentexception When Generating Random Number"
Post a Comment for "Getting An Illegalargumentexception When Generating Random Number"