KnowledgeBoat Logo
|

Computer Applications

What is the output of the statement Math.pow(36, 6/5); ?

  1. 36.0
  2. 1.0
  3. 73.71
  4. 6.0

Java Math Lib Methods

4 Likes

Answer

36.0

Reason — In the expression Math.pow(36, 6/5), the division 6/5 is performed first using integer division, which results in 1 (not 1.2). Therefore, the expression becomes Math.pow(36, 1), which evaluates to 36.0 since the pow() method returns a double value.

Answered By

2 Likes


Related Questions