When we define generics, we use Object as a data type where we are not sure about the actual type.
Map<String, Object> data = new HashMap<String, Object>();
We are not doing any value add by defining the generic as Object (You must be remembering that Object class is the Super parent class).
Map<String, Object> data = new HashMap<String, Object>();
We are not doing any value add by defining the generic as Object (You must be remembering that Object class is the Super parent class).
0 comments:
Post a Comment