Page 1 of 1

About Question enthuware.ocpjp.v21.2.4033 :

Posted: Sun Mar 09, 2025 7:01 am
by pablin13
The given answer in the first option states that the output will be "10.0 10 10", but the correct output is "10.0 10 10.0".

This discrepancy occurs because the variable e is a double, not an int. Specifically, e is assigned the result of mean(d, d), which calls the method:

Code: Select all

double mean(int i, int j) { 
    return Math.sqrt(i * j); 
}
Since d = 10, the method computes:

Code: Select all

Math.sqrt(10 * 10) = 10.0;  // Returns a double

Re: About Question enthuware.ocpjp.v21.2.4033 :

Posted: Sun Mar 09, 2025 11:05 am
by admin
You are right. Fixed.
thank you for your feedback!