title: Cannot find symbol: method add
body: <p>Why am I receiving the following error: <code>cannot find symbol: method add</code>? This is my code:</p>
  
  <pre><code>import java.util.*
  
  public class ArrayList {
      // instance variables - replace the example below with your own
      public void processinput(String s) {
          int[] a = { 34, 25, 16, 98, 77, 101, 24 };
  
          ArrayList b = new ArrayList();
  
          for (int i = 0; i &lt; a.length; i++) {
              int d = a[i];
              if (d % 2 &gt; 0) {
                  b.add(new Integer(d));
              }
          }
  
          for (int i = 0; i &lt; b.size(); i++) {
              System.out.print(b.get(i) + " ");
          }
  
          for (int i = a.length - 1; i &gt;= 0; i--) {
              System.out.print(a[i] + " ");
          }
      }
  }
  </code></pre>
  
  <p>How can I resolve this error?</p>