Oracle
1Z0-815 · Question #26
Given: Which expression when added at line 1 will produce the output of 1.17?
The correct answer is D. float z = Math.round((float)x/y*100)/(float)100. See the full explanation below for the reasoning.
Question
Given:
Which expression when added at line 1 will produce the output of 1.17?
Exhibit
Options
- Afloat z = (float)(Math.round((float)x/y*100)/100);
- Bfloat z = Math.round((int)(x/y),2);
- Cfloat z = Math.round((float)x/y,2);
- Dfloat z = Math.round((float)x/y*100)/(float)100;
How the community answered
(27 responses)- A11% (3)
- B4% (1)
- C4% (1)
- D81% (22)
Community Discussion
No community discussion yet for this question.
