adding another set Strings to TreeSet - java
<p>I have a public method (called getMusic) in a class called Favorites. getMusic has set. There are 3 sets and in each set has five words, Set getMusic(). In another class called myInterest, there is a treeSet called musicTable. I called getMusic method into myInterest class but I do not know how to iterate over so that the set of words can be added to musicTable TreeSet. I tried to use addAll but it's not working. Where I am going wrong and how do I fix this? .I don't want to use list, I've thought about for loop but not to sure how to use this or literate(). thank you</p>

<pre><code>public class myInterest
{

  private static TreeSet&lt;String&gt; musicTable = new TreeSet&lt;String&gt;();  

  public Test()
   {
     super();
     musicTable = new TreeSet&lt;String&gt;();
   }


  public static void testOut()
  {

    Favorites entrainment = new Favorites(); 

    System.out.println(" " + entrainment.getMusic());

    entrainment.addAll(musicTable); //error msg "cannot find symbol - method addAll(java.util.TreeSet&lt;java.lang.String&gt;)

    musicTable.addAll(entrainment); //also tried this way but error msg "cannot find symbol - method addAll(Favorities) 
  }

}
</code></pre>
