java random number between 0 and 100 range why need max-min+1 code example Example: random number in range java (int)(Math.random() * ((max - min) + 1)) + min Copy