java - Cannot cast object to hashmap -


my code:

object res =  stub.call(sessionid, "sale.list", "11111"); hashmap<string, string> map = (hashmap<string, string>) res; 

converting object hashmap got following exception,

exception in thread "main" java.lang.classcastexception: [ljava.util.hashmap;    cannot cast java.util.hashmap 

can me how retrieve object data?

you can cast res hashmap if stub.call(sessionid, "sale.list", "11111") returns hashmap object.

[ljava.lang.hashmap; indicates getting array of hashmap , not single hashmap.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -