title: error: Array required, but String found
body: <p>I've declared public static arrays for name and id: </p>
  
  <pre><code>public static String[] name = new String[19];     
  public static int[] id  = new int[19];
  </code></pre>
  
  <p>But <code>java compiler</code> says:  </p>
  
  <pre><code>java:70: error: array required, but String found
  java:71: error: array required, but int found
  </code></pre>
  
  <p>I don't know what's wrong. Is it how I declared the variables or in the method that I wrote?</p>
  
  <pre><code>public static boolean add(String name, int id, int i) 
  {
      if (i &lt; 20) {
          name[i] = name;
          id[i] = id;
          return true;
      }
      else if (i &gt; 20) {
          for (int j = 0; j &lt; id.length; j++) {
              if (id[j] == 0 &amp;&amp; name[j].equals("null"))
                  id[j] = id;
              name[j] = name; 
          }
          return true;
      }
      else
          return false;
  }
  </code></pre>