NEW
Font size
WorksheetsMathematical Functions in Java
Total questions: 15
Worksheet time: 8mins
This function returns the maximum of 2 numbers
Math.min()
Math.max()
Math.minmax()
All mathematical functions are included in a class called
Math
System
Scanner
Math class is a part of Java.________ package
io
util
lang
what will be the output of Math.sqrt(-4.0)
2
-2
NaN
What will be the return value of Math.pow(2.0,3.0)
8.0
8
NaN
The return value of Math.cbrt(-15.625) is
2.5
-2.5
NaN
__________ function returns the magnitude of the number without the sign
Math.round
Math.floor
Math.abs
The return data type for the Math.round() is________
float
integer
double
The return value for Math.round(-51.2) is
-51
-50
-52
Math.ceil() will always return _____ data type
integer
float
double
The output of the function Math.ceil(-31.987)
-31.0
-32.0
-30.0
The output of Math.floor(36.987) is
36
37
35
The output of the function Math.floor(-0.9)
1
0
-1
This functions returns a random number between 0 and 1
Math.round()
Math.random()
Math.intrandom()
Math.max(-43,-41) will return
-43
-41
NaN
