Saying that "Map<String,Object>" is wrong, makes me wonder if the author actually has done any real work with generics. Even Java itself uses this to clear out problems with erasure, like in the case of javax.script.Bindings.
By using objects, we are not using Generics properly, collections already require object to be added in. Generics take it further asking you to specify the type of object.
The article has mistakes, even first code snippet and second one almost identical , but author said that it solves the problem with Generics, (in fact no generic is used on second one as well)... I am assuming that this is some typo...
Comments
newton_dave replied ago:
Meh.
killerweb replied ago:
Saying that "Map<String,Object>" is wrong, makes me wonder if the author actually has done any real work with generics. Even Java itself uses this to clear out problems with erasure, like in the case of javax.script.Bindings.
deepakcg replied ago:
By using objects, we are not using Generics properly, collections already require object to be added in. Generics take it further asking you to specify the type of object.
kshakir replied ago:
The article has mistakes, even first code snippet and second one almost identical , but author said that it solves the problem with Generics, (in fact no generic is used on second one as well)... I am assuming that this is some typo...
deepakcg replied ago:
Thanks, suff with "
deepakcg replied ago:
The way it happened to above comment the stuff with angular brackets just evaporated.
Voters For This Link (7)
Voters Against This Link (2)