Dynamic java object creation : public class Test{

    public void setMembersValues(List list){

        List<Member>  memberList = new ArrayList<Member>();

        for(Object o : list){

            String[] str = o.split("\n");

            if(str.equalsIgnoreCase("<member>")){

/**I want to create separate member objects for each list iterration.But member refers same object.**/

                Member member = new Member();

                for(int i =0; i<str.length;i++){

                    if(str[i].equalsIgnoreCase("<member/>")){
                        memberList.add(member);
                        break;
                    }else{
                        if(str[i].equalsIgnoreCase("name"))
                            member.setName(str[i].split("//")[1]);
                    }else if(str[i].equalsIgnoreCase("Address")){
                        member.setAddress(str[i].split("//")[1]);
                    }
                }

            }

        }
    }
}

There are two lists here, but only one member object is created. I want to create separate member objects for each iteration and add it to memberList. How can I do it, please?.