In my project I use employee bean list in the list empVal string value contain 01,02,03,05
in the same I need to avoid in another string
i.e in first bean emp1.empval="01,02,03,05" and second bean emp2.empval=" 01,02,03,05". So emp2.empval should not be allowed as bean value numbers are present in emp2. empval is already exists in emp1.empval.
pulblic class employee
{
private String empVal;
......
}
my doubt is how to achieve it either using iterate or split to compare string or any other way is possible?