title: ArrayList initialization through List.of()
body: <p>From Core Java for the Impatient: </p>
  
  <blockquote>
    <p>... there is no initializer syntax for array lists. The best you can
    do is construct an array list like this:  </p>
  </blockquote>
  
  <pre><code>ArrayList&lt;String&gt; friends =  new ArrayList&lt;&gt;(List.of("Peter", "Paul"));
  </code></pre>
  
  <p>But when I'm try compiling this code getting error: </p>
  
  <pre><code>error: cannot find symbol
                  ArrayList&lt;String&gt; friends = new ArrayList&lt;&gt;(List.of("Peter", "Paul"));
                                                              ^
    symbol:   variable List
  </code></pre>
  
  <p>My imports are:</p>
  
  <pre><code>import java.util.List;
  import java.util.ArrayList;
  </code></pre>
  
  <p>Thanks </p>