The double is a primitive type, while the Double is a regular Java class. You cannot call a method on a primitive type. The intValue() method is however available on the Double, as shown in the javadoc
Some more reading on those primitive types can be found here