Where is the problem?
package pl.codegym.task.task08.task0822;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.*;
/*
Najmniejsza z N liczb
*/
public class Solution {
public static void main(String[] args) throws Exception {
List<Integer> listaLiczbCalkowitych = getListaLiczbCalkowitych();
System.out.println(getMinimum(listaLiczbCalkowitych));
}
public static int getMinimum(List<Integer> array) {
int i = Collections.min(array);
return i;
}
public static List<Integer> getListaLiczbCalkowitych() throws IOException {
ArrayList<Integer> listaLiczbCalkowitych = new ArrayList<Integer>();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
String line = bufferedReader.readLine();
while (line != null) {
listaLiczbCalkowitych.add(Integer.parseInt(line));
// read next line
line = bufferedReader.readLine();
}
return listaLiczbCalkowitych;
}
}