title: Java: interface in collection not recognized as parameter
body: <p>Simple design and simple code but don't compile:</p>
  
  <pre><code>public interface Insertable {
      public String getInsertStmt(String table);
  }
  
  public class ClassCanBeInserted implements Insertable { 
      public String getInsertStmt(String table) {}
  }
  
  public class SomeClass { 
      public static void main() { 
          List&lt;ClassCanBeInserted&gt; list = new ArrayList&lt;ClassCanBeInserted&gt;();
          SomeMethod(list);
      }
      private static void SomeMethod(List&lt;Insertable&gt; list) {}
  }
  </code></pre>
  
  <p>And the call to SomeMethod() won't compile. English poor but the code should explain. Can someone please figure out what's wrong and how to get a design for the propose that a list of interface-implemented classes can be used in such method?</p>
  
  <p>Again, English poor, so may not expressed well. Let me know your questions. Thanks!</p>
  
  <p>Error message given: 
  The method SomeMethod(List) in the type ClassCanBeInserted is not applicable for the arguments (List)</p>