Question: ( b ) Given the following method declaration: public static double round ( double value ) { double result = value * 1 0 0

(b) Given the following method declaration:
public static double round(double value){
double result = value *100; // upscale the number
result = Math.round(result); // round to nearest integer
return result /100; // downscale the number
}
What value does Java statement System.out.print(round(2.71828)); display?
( b ) Given the following method declaration:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!