Commit 93587e6b by Patryk Czarnik

Rozważania nt method reference

parent 91bf7f37
package emps;
import java.util.List;
public class F1_WypiszWybranePola_Map {
public static void main(String[] args) {
List<Employee> emps = ObslugaCSV.wczytaj("emps.csv");
// emps.forEach(Employee::printInfo);
emps.stream()
.map(emp -> emp.getFirstName() + " " + emp.getLastName() + " zarabia " + emp.getSalary())
.forEach(System.out::println);
// emps.stream()
// .map(Employee::getInfo)
// .forEach(System.out::println);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment