java - How do I convert an object array into a map array? -
i have following code snippet:
//create map array , fill 3 dummy maps map[] maparr= new map[3]; for(int = 0; < maparr.length; i++) { map map = new hashmap(); maparr[i] = map; } //now remove second element (index == 1) map array maparr = arrayutils.removeelement(maparr, 1);
my problem witht final line of code, because no matter try error
type mismatch: cannot convert object[] map[]
how convert object[] returned removeelement() map[]?
did try cast "map[]" ?
maparr = (map[]) arrayutils.removeelement(maparr, 1);
Comments
Post a Comment