I'm not sure why this is not passing but it keeps telling me "Be sure that the max method works correctly with negative numbers". Well it does but I'm still not passing so I'm not sure what else to do. Here is my code:
package com.codegym.task.task07.task0701;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/*
Maximum in an array

*/

public class Solution {
    public static void main(String[] args) throws Exception {
        int[] array = initializeArray();
        int max = max(array);
        System.out.println(max);
    }

    public static int[] initializeArray() throws IOException {
        // Create and populate the array
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        int[] arr = new int[20];

        for (int i = 0; i < arr.length; i++) {
            arr[i] = Integer.parseInt(r.readLine());
        }
        return arr;
    }

    public static int max(int[] array) {
        // Find the maximum
        int max = array[0];
        for (int i = 1; i < array.length; i++) {
            max = array[0] > array[i] ? max : array[i];
        }
        return max;
    }
}