Coforge interview question

Two programs 1. Take any collection you want duplicate elements are not allowed into that list . 2. Sort algorithm based on employee age using java 8

Interview Answer

Anonymous

18 Sept 2021

1. Set interface 2. list.stream(). sorted (comparator.comparing(Employee::getAge())).collect(collectors.toList());