title: Creating Method to Reference Parent Array List
body: <p>So I had asked a question similar to this, but I don't think the answer I got worked with what I was trying to do.</p>
  
  <p>Say I have this class:</p>
  
  <p><strong>Java Code</strong></p>
  
  <pre><code>public class Section
  {
      private String sDocumentTitle;
      private String sHeadingTitle;
      private String sText;
      public ArrayList&lt;Section&gt; aSiblingSection = new ArrayList&lt;Section&gt;();
      public ArrayList&lt;Section&gt; aChildSection = new ArrayList&lt;Section&gt;();
      public ArrayList&lt;image&gt; aImages = new ArrayList&lt;image&gt;();
  
      public void setName(String docTitle)
      {
          //set passed parameter as name
          sDocumentTitle = docTitle;
      }
  
      public void addName (String docTitle)
      {
          //adds remaining Title String together
          sDocumentTitle += (" " + docTitle);
      }
  
      public String getName()
      {
          //return the set name
          return sDocumentTitle;
      }
  
      public void setSection(String section)
      {
          //set passed parameter as name
          sHeadingTitle = section;
      }
  
      public void addSection(String section)
      {
          //adds section parts together
          sHeadingTitle += ("" + section);
      }
  
      public String getSection()
      {
          //return the set name
          return sHeadingTitle;
      }
      public void setText(String text)
      {
          //set passed parameter as name
          sText = text;
      }
  
      public void addText(String text)
      {
          //adds 
          sText += (" " + text);
      }
  
      public String getText()
      {
          //return the set name
          return sText;
      }
      public ArrayList getChildSection()
      {
          return aChildSection;
      }
  }  
  </code></pre>
  
  <p>And a child section initialized in this manner in a driver class...</p>
  
  <pre><code>Section aSection = new Section();
  aMainSection.get(0).aChildSection.add(aSection);
  </code></pre>
  
  <p>Essentially, could someone give me an idea of how I would I add a method in the section class which returns the parents from an array list of 'aChildSection'?</p>