So let's say I got 2 numbers, 65 and 75, is there any way so Greenfoot only pick between 65 or 75? Thanks!


1 | Greenfoot.getRandomNumber( 10 ) + 65 ; |
1 2 | int [] nums = new int [] { 65 , 75 }; // any set of values int choice = nums[Greenfoot.getRandomNumber(nums.length)]; |
1 | int [] nums = new int [] { 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 }; |