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
You don't have to avoid autoboxing if talking about performance, JVM should handle that. The only thing you should consider is a readability of your code.