How to caste hashmap to linkedhashmap?
890683Oct 26 2011 — edited Oct 26 2011Hi,
I am getting values from webservices and the webservice method returns LinkedHashmap but I am getting it has hashmap in my program(no idea why it is coming as hashmap instead of linkedhashmap). So when i tried to cast this hashmap into Linkedhashmap, it is throwing the following exception.
Exception in thread "main" java.lang.ClassCastException: java.util.HashMap cannot be cast to java.util.LinkedHashMap
Please help.
Regards,
Raj