Both are `double`

.

Here is some of the documentation (find this on the Web with a search for "Java cos"):

java.lang Class Math ...cospublic static doublecos(double a) Returns the trigonometric cosine of an angle.

`cos`

is a static function of the class `Math`

,
which is found in the `java.lang`

package.
Classes from that package (such as `String`

and `Math`

)
are so common that you do not have to import the package.
The angle `a`

is a `double`

and must be expressed in radians.
The return value is a `double`

.

(Math Review: ) Can angles in radian mesure be converted to degrees?