title: Java/BlueJ - Trouble printing out items in an ArrayList
body: <p>I'm having issues with looping/returning correct items in my ArrayList. When I run my program, and use my accessor method, it returns items in the terminal such as "Member@13243" instead of the actual member I'm trying to return. I have two classes, one "Family" and one "Member". </p>
  
  <p>My tasks are:
  2) getMembers() – returns a List of members that had been added to the Family.
  3) getMembers(string s) - returns a List of members that had been added to the Family.
  a. An error should be output if the specified sex is not valid.
  4) showMembers() – use Member’s toString to print a list of Members that had been added to a Family
  5) showMembers(string s) – use Member’s toString to print a list of Members that had been added to a Family of the 
  specified sex.</p>
  
  <p>My code for class Family:</p>
  
  <pre><code>  public class Family
  
   {
      // instance variables - replace the example below with your own
     public int ID;
     public String FamilyName;
     public String Address;
     public String City;
     public String State;
     public String ZipCode;
     public ArrayList&lt;Member&gt; list;
  
     public Family(int ID, String FamilyName, String Address, String City, String State, String        ZipCode)
     {
      this.ID = ID;
      this.FamilyName = FamilyName;
      this.Address = Address;
      this.City = City;
      this.State = State;
      this.ZipCode = ZipCode;
      list = new ArrayList&lt;Member&gt;();
     }
  
  public void addMember(Member m )  {
  
     list.add(m);
  
  }
  
  
  private ArrayList&lt;Member&gt; getMembers(){
  return list;
  }
  
  
  public void showAll(){
  System.out.println(ID);  
  System.out.println(Member.memberName);
  System.out.println(FamilyName);
  System.out.println(Member.memberSex); 
  System.out.println(Address); 
  System.out.println(City); 
  System.out.println(State); 
  System.out.println(ZipCode); 
  
  }
  </code></pre>
  
  <p>My code for class Member:</p>
  
  <pre><code> public class Member 
   {
  
     private String memberName;
     private String memberSex;
  
  
  
     public Member(String memberName, String memberSex){
  
      this.memberName = memberName;
      this.memberSex = memberSex;
  
  
       if (memberSex == "M"){
      memberSex = "M";}
  
      else if (memberSex == "F"){
      memberSex = "F";}
  
      else System.out.println("Please enter M or F for sex");
  
  
      }
  
      public String getMemberName(){
          return memberName;
      }
  
      public String getMemberSex(){
         return memberSex;
      }
  </code></pre>