0

Hi,

I am trying to get the max number from an array, but I'm not sure how to tackle it. This is what I have so far.

```
import javax.swing.*;
public class InitArray
{
public static void main( String args[] )
{
int array[] = { 69, 23, 47, 81, 92, 88, 52, 48, 56, 66, 65, 76, 71, 85, 49, 53, 56, 61, 65, 84 };
double sum, average;
sum = 0;
for (int i = 0; i < array.length; i++) {
sum += array[i];
}
average = sum / array.length;
System.out.println("Average mark = " + average);
}
}
```

Any help would appreciated.

Thanks!