I have the following code that has primitive wrapper classes:

```
// setValue expects Integer (class)
// getValue returns Short (class)
intLength.setValue(shortLength.getValue());

```

Netbeans flags this as an error "incompatible types: Short cannot be converted to Integer", and I get a compile error, which makes sense.

However if I add an extra set of brackets:

```
// setValue expects Integer (class)
// getValue returns Short (class)
intLength.setValue((shortLength.getValue()));

```

The error disappears and the code compiles and works. Can anyone tell me what the extra brackets are doing/why do the brackets do the casting.
Thanks.