I have to return the index number of the lowest value in an array of 12 numbers. I keep getting 12 as the result every time I run it. Here is my code:
minRain =
You are assigning array value to the lowest, so change it as shown below:
lowest
public static int leastRain (double[] mon4){ int lowestIndex = 0;//set index as 0 instead of array value int lowestValue = mon4[0]; for (int index=1; index