KnowledgeBoat Logo
|

Computer Applications

Given: d = Math.min(-15.5, -19.5);
What data type will you refer for the variable d?

  1. int
  2. float
  3. double
  4. None

Java Math Lib Methods

24 Likes

Answer

double

Reason — The return data type of Math.min() function depends on its arguments. Here, the arguments are of double data type hence, Math.min() will return a double value. So, data type of variable d will be double.

Answered By

18 Likes


Related Questions