Why doesnt it work?
package en.codegym.task.pro.task05.task0506;
import java.util.Scanner;
import java.util.Arrays;
/*
Minimum of N numbers
*/
public class Solution {
public static int[] array;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] array = new int[N];
for (int i = 0; i < N; i++){
array[i] = sc.nextInt();
}
Arrays.sort(array);
System.out.println(array[0]);
}
}