Computer-Networks
October 3, 2023OOPS
October 3, 2023OOPS
Question 37
|
Which of the following are valid calls to math.max in java?
- Math.max(1,4)
- Math.max(2.3,5)
- Math.max(1,3,5,7)
- Math.max(-1.5,-2.8f)
A,b and d
|
|
B,c and d
|
|
A,b and c
|
|
C and d
|
Question 37 Explanation:
→The java.lang.Math.max(int a, int b) returns the greater of two int values.
→We can find the greater of any two data types variables.
→Option C consists of four variables , So it is invalid.
→We can find the greater of any two data types variables.
→Option C consists of four variables , So it is invalid.
Correct Answer: A
Question 37 Explanation:
→The java.lang.Math.max(int a, int b) returns the greater of two int values.
→We can find the greater of any two data types variables.
→Option C consists of four variables , So it is invalid.
→We can find the greater of any two data types variables.
→Option C consists of four variables , So it is invalid.
Subscribe
Login
0 Comments