I am having a list of bean, now i want to change the value of an attribute of all the beans in the list. For example:
class Person{
String name;
int age;
String attrXYZ;
/* accessors and mutators */
}
List<Person> lstPerson = getAllPersons();
//set the attribute attrXYZ of all persons in the list to 'undefined'
One way is to iterate the list and call setAttrXYZ ( 'undefined' );
this is what i am doing right now.
I would like to know is there any other approach of doing this.