Math Class Mcqs and Java Expresions
Math Class Mcqs and Java Expresions
Question A [8 X 1= 8 MARKS]
Question 1
1. java.io
2. java.lang
3. java.util
4. java.sys
Question 2
1. 3
2. 3.0
3. 3.00
4. All of these
Question 3
1. 46.6
2. 46.5
3. 47.0
4. 46.0
Question 4
1. -9.99
2. 9.99
3. 0.99
4. None of these
Question 5
1. FindSquareroot(x)
2. Sqrt(x)
3. Math.Square(x)
4. Math.sqrt(x)
Question 6
1. 0.0
2. 1.0
3. 2.0
4. -1.0
Question 7
Question 8
1. 46.5
2. 47.0
3. -46.0
4. 46.0
Question B [ 5X 2= 10 MARKS]
Question D[ 1 X 3= 3 MARKS]
Write the equivalent Java statements for the following, only using
the mathematical functions:
ii. Store the value -125 in a variable and print its cube root.
iii. Store the value 89.99 in a variable and convert it into its closest
integer that is greater than or equal to 89.99.