D4 – M Q&A
What is Math.round(3.6)?
a. 3.0
b. 3
c. 4
d. 4.0 - (correct answer)c
What is Math.rint(3.6)?
a. 3.0
b. 3
c. 4.0
d. 5.0 - (correct answer)c
What is Math.rint(3.5)?
a. 3.0
b. 3
c. 4
d. 4.0
e. 5.0 - (correct answer)d
What is Math.ceil(3.6)?
a. 3.0
b. 3
c. 4.0
d. 5.0 - (correct answer)c
What is Math.floor(3.6)?
,a. 3.0
b. 3
c. 4
d. 5.0 - (correct answer)a
To obtain the sine of 35 degrees, use _______.
a. Math.sin(35)
b. Math.sin(Math.toRadians(35))
c. Math.sin(Math.toDegrees(35))
d. Math.sin(Math.toRadian(35))
e. Math.sin(Math.toDegree(35)) - (correct answer)b
To obtain the arc sine of 0.5, use _______.
a. Math.asin(0.5)
b. Math.asin(Math.toDegrees(0.5))
c. Math.sin(Math.toRadian(0.5))
e. Math.sin(0.5) - (correct answer)a
Math.asin(0.5) returns _______.
a. 30
b. Math.toRadians(30)
c. Math.PI / 4
e. Math.PI / 2 - (correct answer)b
Math.sin(Math.PI) returns _______.
a. 0.0
b. 1.0
, c. 0.5
e. 0.4 - (correct answer)a
Math.cos(Math.PI) returns _______.
a. 0.0
b. 1.0
c. -1.0
e. 0.5 - (correct answer)c
Which of the following is the correct expression of character 4?
a. 4
b. "4"
c. '\0004'
d. '4' - (correct answer)d
A Java character is stored in __________.
a. one byte
b. two bytes
c. three bytes
d. four bytes - (correct answer)b
Suppose x is a char variable with a value 'b'. What is the printout of the statement
System.out.println(++x)?
a. a
b. b
c. c
d. d - (correct answer)c
What is Math.round(3.6)?
a. 3.0
b. 3
c. 4
d. 4.0 - (correct answer)c
What is Math.rint(3.6)?
a. 3.0
b. 3
c. 4.0
d. 5.0 - (correct answer)c
What is Math.rint(3.5)?
a. 3.0
b. 3
c. 4
d. 4.0
e. 5.0 - (correct answer)d
What is Math.ceil(3.6)?
a. 3.0
b. 3
c. 4.0
d. 5.0 - (correct answer)c
What is Math.floor(3.6)?
,a. 3.0
b. 3
c. 4
d. 5.0 - (correct answer)a
To obtain the sine of 35 degrees, use _______.
a. Math.sin(35)
b. Math.sin(Math.toRadians(35))
c. Math.sin(Math.toDegrees(35))
d. Math.sin(Math.toRadian(35))
e. Math.sin(Math.toDegree(35)) - (correct answer)b
To obtain the arc sine of 0.5, use _______.
a. Math.asin(0.5)
b. Math.asin(Math.toDegrees(0.5))
c. Math.sin(Math.toRadian(0.5))
e. Math.sin(0.5) - (correct answer)a
Math.asin(0.5) returns _______.
a. 30
b. Math.toRadians(30)
c. Math.PI / 4
e. Math.PI / 2 - (correct answer)b
Math.sin(Math.PI) returns _______.
a. 0.0
b. 1.0
, c. 0.5
e. 0.4 - (correct answer)a
Math.cos(Math.PI) returns _______.
a. 0.0
b. 1.0
c. -1.0
e. 0.5 - (correct answer)c
Which of the following is the correct expression of character 4?
a. 4
b. "4"
c. '\0004'
d. '4' - (correct answer)d
A Java character is stored in __________.
a. one byte
b. two bytes
c. three bytes
d. four bytes - (correct answer)b
Suppose x is a char variable with a value 'b'. What is the printout of the statement
System.out.println(++x)?
a. a
b. b
c. c
d. d - (correct answer)c