java - "The method put(Object, Object) in the type HashMap is not applicable for the arguments (String, boolean)" -
hm.put("billingenquiry",true); produces error
the method put(object, object) in type hashmap not applicable arguments (string,boolean)". how resolve issue?
you're using non-parametrized hashmap. try declare hashmap this:
hashmap<string, boolean> mymap = new hashmap<string, boolean>(); also note cannot use primitive types in generic types. this:
hashmap<string, boolean> mymap = new hashmap<string, boolean>(); ... incorrect , won't compile.
Comments
Post a Comment