title: ArrayList add private access error
body: <p>I'm trying to create an array list which is created using variables inputting by the user.
  It is created in a switch statement and I'm getting this error about the add statement when adding data to the array list.</p>
  
  <pre class="lang-java prettyprint-override"><code>add(java.lang.String, java.lang.Object[], int) has private access in java.util.ArrayList
  </code></pre>
  
  <p>Code below:</p>
  
  <pre><code>String stringE30 = Integer.toString(ratingE30);
  String stringE36 = Integer.toString(ratingE36);
  String stringE46 = Integer.toString(ratingE46);
  String stringE92 = Integer.toString(ratingE92);
  String stringF80 = Integer.toString(ratingF80);
  
  ArrayList&lt;String&gt; arrayListToFile = new ArrayList&lt;&gt;();
  arrayListToFile.add("E30", "1985", stringE30);
  arrayListToFile.add("E36", "1992", stringE36);
  arrayListToFile.add("E46", "2000", stringE46);
  arrayListToFile.add("E92", "2007", stringE92);
  arrayListToFile.add("F80", "2014", stringF80);
  </code></pre>
  
  <p>Thanks for any help.</p>