Multiple choice

Which of the following is true?

i. All transcendental math functions like sin(), cos() etc return float values. ii. All transcendental math functions like sin(), cos() etc return double values. iii. All transcendental math functions like sin(), cos() etc return int values. iv. All transcendental math functions like sin(), cos() etc return long values.

  1. i. is only correct

  2. ii. is only correct

  3. iii. is only correct

  4. iv. is only correct

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

This answer is correct. Java returns double values because double precision will be faster than the single precision and also to optimize the high-speed math calculations.