Question: Pulling data from a cmdb into another repository. Problem is the cmdb data has misspelled/duplicate records (e.g., some assets have a Department Name as Marketing, or Markting, or Marketing&amp -- when they are all just in Marketing). Want to run a select query that displays all incorrectly named department records as the single, correct name. Any help on how to approach this?

Answer: 
This doesn't seem like random number generation, it seems like randomly shuffling a `Collection`.

In Java 8:

```
public static void main(String[] args) {
    final int min = 0;
    final int max = 10;
    final List<Integer> nums = IntStream.rangeClosed(min, max).
            boxed().
            collect(toList());
    Collections.shuffle(nums);
    nums.forEach(System.out::println);
}

```

Output:

```
3
10
5
0
8
7
9
2
1
4
6

```

Each number `[0, 10]` appears only once in a random order.
if you just want to exclude a single number replace this:

```
r = (int)(Math.random() * Maximum) + Minimum;

```

with this:

```
while( ( r = (int)(Math.random() * Maximum) + Minimum) == excludedNumber );

```