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
Post a Comment