Map<String, String> fieldAttributes = new HashMap<String, String>();
fieldAttributes.put("a", "48");
fieldAttributes.put("b", "");
fieldAttributes.put("c", "4224");
Now I need to cast Map<String, String> to Map<Object, Object>
How can I do this. I tried ? extends Object but not sure how to use it.
Map<Object,Object>is neither a subtype nor a supertype ofMap<String,String>. TryMap<?,?>instead - it's a supertype of bothMap<String,String>andMap<Object,Object>, so it might be what you want. Is the function that requiresMap<Object,Object>something you can change?