Java Programming - array - for int
I'm trying to create a program to print the maximum element (largest number) of an element stored in some array values.
I can't figure out the right for (int code. I need it to compare the maximum with the next element.
And also need to check if the next element is bigger then resest the max to that.
Here is what I have so far:
public class CalcMax
{
public static void main (String[] args)
{
double values[] = {1.3, 5.6, 2.9, 3.7, 2.5, 3.2};
double max = values[0];
for (int i =
max = Double.parseDouble(inString);
System.out.println("max value = " + max);
}
}

