You are using "Double", which is a class and can be null. Use "double" instead, it is a primitive type and cannot be null. The class just wraps around the primitive type. Generally it is better to...