Link Details

Link 199015 thumbnail
User 413224 avatar

By deepakcg
via myhomepageindia.com
Published: Jul 03 2009 / 09:59

Short and Good explanation of Generics in Java 5
  • 7
  • 2
  • 1672
  • 697

Comments

Add your comment
User 306525 avatar

newton_dave replied ago:

0 votes Vote down Vote up Reply

Meh.

User 270877 avatar

killerweb replied ago:

2 votes Vote down Vote up Reply

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.

User 413224 avatar

deepakcg replied ago:

0 votes Vote down Vote up Reply

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.

User 376438 avatar

kshakir replied ago:

0 votes Vote down Vote up Reply

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...

User 413224 avatar

deepakcg replied ago:

0 votes Vote down Vote up Reply

Thanks, suff with "

User 413224 avatar

deepakcg replied ago:

0 votes Vote down Vote up Reply

The way it happened to above comment the stuff with angular brackets just evaporated.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (7)



Voters Against This Link (2)