package alx.p31_streamy.emps;

import java.util.List;

public class P5_MinMax_v1 {

	public static void main(String[] args) {
		List<Employee> emps = ObslugaCSV.wczytaj("emps.csv");

		int min = emps.stream()
				.mapToInt(Employee::getSalary)
				.min()
				.orElse(0);
		
		int max = emps.stream()
				.mapToInt(Employee::getSalary)
				.max()
				.orElse(0);
		
		System.out.println("Najmniejsza pensja: " + min);
		System.out.println("Największa pensja: " + max);
	}

}
