Examlex

Solved

Select the Statement That Reveals the Logic Error in the Following

question 4

Multiple Choice

Select the statement that reveals the logic error in the following method.
public static double minimum(double[] data)
{
double smallest = 0.0;
for (int i = 0; i < data.length; i++)
{
if (data[i] < smallest)
{
smallest = data[i];
}
}
return smallest;
}


Definitions:

Finely Tune

To make very small adjustments to something in order to achieve the best or desired performance.

Motivates

Provides reason or incentive for someone to act or behave in a certain way.

Baby's Posture

The typical positions or alignments adopted by an infant while sitting, standing, or lying.

Supported

Being provided with assistance, encouragement, or approval, either emotionally or materially.

Related Questions