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 =
It is a silly mistake you made - you assigned index to your variable instead of an array value. Do this:
public static int leastRain (double[] mon4){ int lowest = 0; for (int index=1; index