title: The method func(List<Object>) in the type is not applicable for the arguments (List<String>)
body: <p>I have tried both these pieces of code but I am getting errors for both.
  Attached below are both pieces and both errors that I am getting.
  I would appreciate any insight as to why this is happening.</p>
  
  <p>Example 1    </p>
  
  <pre><code>static List&lt;String&gt; list = new ArrayList&lt;String&gt;();
  
  public static void main(String[] args) {    
    func(list);    
  }
  
  private static void func(List&lt;Object&gt; lst) {                
  }
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p><code>The method func(List&lt;Object&gt;) in the type is not applicable for the arguments (List&lt;String&gt;)</code></p>
  </blockquote>
  
  <p>Example 2</p>
  
  <pre><code>static List&lt;Object&gt; list = new ArrayList&lt;Object&gt;();
  
  public static void main(String[] args) {
      func(list);    
  }
  
  private static void func(List&lt;String&gt; lst) {
  }           
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p><code>The method func(List&lt;String&gt;) in the type is not applicable for the arguments (List&lt;Object&gt;)</code></p>
  </blockquote>