This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This is my first reply in this forum and I hope it be beneficial.
I think it is not possible to apply polymorphism on the Type of the generic collection; the generic Type has to be the same. so this I think it will work List<HashMap<String, String>> list = new LinkedList<HashMap<String, String>>
As Jim said, just use Map<String,String> on the right side as well.
The declaration does not care about which type of map you use, all it cares about is that you want to add Map<String,String> objects. Now why should your initialization be more restrictive than that? If you really need it to be restricted to HashMap<String,String> you should also declare it as HashMap<String,String>.