package com.javarush.task.pro.task05.task0507;

import java.util.Scanner;

/*
Максимальное из N чисел
*/

public class Solution {
    public static int[] array;

    public static void main(String[] args) throws Exception {

        Scanner console = new Scanner(System.in);
        int initInt = console.nextInt();

        int[] array = new int[initInt];
        // array = new int[initInt];

        int maxInt = Integer.MIN_VALUE;

        for (int i = 0; i < initInt; i++) {
            int forInt = console.nextInt();
            array[i] = forInt;
        }


        for (int i = 0; i < initInt; i++) {
            if (array[i] > maxInt) {
                maxInt = array[i];
            }
        }

        System.out.println(maxInt);
    }
}
Если инициилизировать массив через int[] array = new int[initInt]; - падает на первом тесте Если так array = new int[initInt]; то все нормально? В чем разница? Или бажина в тесте?