title: How to convert a String arrayList elements to a String Variables.?
body: <p>I created an arrayList of type String in the class Demo as follows:</p>
  
  <pre><code>protected ArrayList&lt;String&gt; stringList;
  
  public Demo()
  {
   stringList = new ArrayList&lt;String&gt;();
  }
  </code></pre>
  
  <p>In the other class called client, I created an object of class Demo, so I can access the arrayList:</p>
  
  <pre><code>Demo d; 
  
  public Client()
  {
   b = new Demo();
  }
  </code></pre>
  
  <p>another method called send message which exists in the Client class requires a parameters of type String. I invoked the send message and I gave the string arrayList as a parameters parameter but I keep getting an error as the type of the parameter is not a String.</p>
  
  <pre><code>sendMessage(b.stringList );
  </code></pre>
  
  <p>So, is there a way of storing the arrayList elements into String variables so they can be used within the sendMessage method. </p>