Ask Question
8 November, 02:35

Which of the following are valid calls to Math. max? 1. Math. max (1,4) 2. Math. max (2.3, 5) 3. Math. max (1, 3, 5, 7) 4. Math. max (-1.5, - 2.8f) A. 1, 2 and 4 B. 2, 3 and 4 C. 1, 2 and 3 D. 3 and 4

+1
Answers (1)
  1. 8 November, 06:29
    0
    1, 2 and 4

    Explanation:

    the Math. max () is the function in java which is used to compare the two values and it gives the maximum of two values.

    it take only two argument and the data type can be int, float etc.

    Math. max (1,4) : it takes two int values and give the output 4. it is valid call.

    Math. max (2.3, 5) : it takes two values and give the output 5.0. it is valid call.

    Math. max (1, 3, 5, 7) : it takes 4 values which is wrong because function takes only two variables. it is not valid call.

    Math. max (-1.5, - 2.8f) : it takes two values and give the output - 1.5. it is valid call.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Which of the following are valid calls to Math. max? 1. Math. max (1,4) 2. Math. max (2.3, 5) 3. Math. max (1, 3, 5, 7) 4. Math. max (-1.5, ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers