Multiple Choice
What is the difference between the result of the following two Java statements?
I. int cents = (int) (100 * price + 0.5) ;
II. int cents = (100 * price + 0.5) ;
A) Statement I causes truncation, but II does not
B) Statement II causes truncation, but I does not
C) Statement I compiles, but II does not
D) Statement II compiles, but I does not
Correct Answer:

Verified
Correct Answer:
Verified
Q16: How do you compute the length of
Q35: The first step in problem solving is<br>A)To
Q53: Which one of the following statements displays
Q62: What is the result of the following
Q88: What is the value inside the var
Q89: Assuming that the user enters 23 and
Q93: What are the values of num1 and
Q95: Given the definition final double PI
Q96: What is the output of the following
Q96: What is the output of this code