I have a Java List called `List<Integer> busy`:

**Which has**

java.util.List : "[17, 21, 36, 22, 35, 23, 10, 6, 9, 11, 2, 19, 7]"

Now, i have a variable called `Int Capacity`

```
Capacity = 30;

```

I want to create each capacity record in a new list called `List<Integer> totallist`;
should be :

```
java.util.List : "[1,2,3,4,5,6,7 uptill 30]"

```

I was doing something like :

```
List<Integer> totallist = new ArrayList<>(capacity);

            for (int i = 0; i < totallist.size(); i++) {
                totallist.add(i); 
            }  

```

I doubt if that is correct ! 

The next step is, i have another list called "**List free**"

Which should give me elements in the totallist minus those in the busy list.

I did something like :

```
List<Integer> free = new ArrayList<>(totallist);
free.removeAll(busy);

```

Is the logic correct ?