title: Convert contents of Array List to String
body: <p>I'm new to Java and I've been trying to turn this Array list of Terms (Letters and Numbers) into a String, (unless its <code>1</code>, in which case the program should ignore the element).</p>
  
  <p>Is this the proper way to go about accomplishing this or should I use a different method?</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>public String display() {
  
      for (int i = 0; i &lt; terms.size(); i++) {
  
          char p = terms.get(i);
  
          if(Character.isDigit(p = 1)) {
              continue;
          } else if (Character.isDigit(p)) {
              return String.valueOf(p);
          } else {
              return Character.toString(p);
          }
      }
  
      p = display(); 
      return display();
  } 
  </code></pre>
  
  <p><strong>Note</strong>: I know this is wrong - I just need someone to point me in the right direction.  </p>
  
  <p>Input Example:
  {Term('C', 1),Term('O',2)} would give "CO2"</p>