I have a POJO class called Employee with empName & Salary. I have a collection of Employee as a object with employee details. Now i want to reset the value of particular field to some common value. In this case i want to assign salary to "0" for all employee items in the list.
List<Employee> empList;
public class Employee{
private String empName = "";
private int empSalary = "";
}
Instead of iterating through the list of employee using For/Foreach and assigning the required value for all items in list.
Is there any easy or efficient way to achieve the same using any CollectionUtils (Apache commons or any other).