double max = 0.0; max = data[0]; for (int i=1; i<size; i++) { if (data[i]>max) { max = data[i]; } System.out.println(max);