“Cannot create generic array of ..” - how to create an Array of Map<String, Object>?
问题 I would like to use simpleJdbcInsert class and executeBatch method public int[] executeBatch(Map<String,Object>[] batch) http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/jdbc/core/simple/SimpleJdbcInsert.html So I need to pass an array of Map<String,Object> as parameter. How to create such an array? What I tried is Map<String, Object>[] myArray = new HashMap<String, Object>[10] It is error: Cannot create generic array of Map<String, Object> A List<Map<String, Object>>