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

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -