I have to make a family tree. I'm going to do this with an ArrayList of ArrayLists. Each ArrayList in the main ArrayList should be named after the person it represents. These "sub ArrayLists" will contain the locations of the parents and children of the person whom it is named after
Ideally what I'm trying to do looks something like this.
public void makeArrayList(String arrayName){
ArrayList arrayName = new ArrayList();
}
But I cannot do this as "arrayName" is already declared in the method.
Is this what you were talking about doing?
public class Member{
public Member(String name, ArrayList<String> infoList)
public ArrayList<Member> MemberList = new ArrayList<Member>();
public void getName(){
return Member.name;
}
public void getList(){
return Member.infoList;
}