
February 19th, 2013, 11:12 AM
|
|
Registered User
|
|
Join Date: Feb 2013
Posts: 4
Time spent in forums: 1 h 19 m 53 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by lalossa Hi,
I would like to use simpleJdbcInsert class and executeBatch method
public int[] executeBatch(Map<String,Object>[] batch)
So I need to pass an array of Map<String,Object> as paramter. 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>
So how to create an array of Map<String, Object> ?
Thanks |
You could make an ArrayList from this using the List interface.
Code:
List<HashMap<String, Object>> l = new ArrayList<HashMap<String,Object>>();
Greetings, Jojo
|