There are instances where a method expects a primitive type double and you pass a Double object as a parameter.
double
Double
Since the compiler unboxes
The rule of thumb is: always use primitives if possible.
There are cases where this is not possible, like collections, so use wrappers only then.