2

Possible Duplicate:
In Java, what does it mean when a type is followed by angle brackets (as in List<Foo>)?

Exactly what it says on the tin - what does <int> mean in Java? I can't use Google here, since Google seems to ignore characters such as < and >, so I end up searching "What does int mean in Java". Can anyone help please? This doesn't just apply to <int>, it applies to anything inside <>.

Community
  • 1
  • 1
Bluefire
  • 13,519
  • 24
  • 74
  • 118
  • 7
    Well, `` is illegal in Java, so it's a pretty poor example to use. – Mark Peters Jun 16 '12 at 12:36
  • It's part of java generics, though the example should be as int is a primitive. A better example is List which represents a list of integers. – Dave Richardson Jun 16 '12 at 12:39
  • Seems to be fine [here](http://stackoverflow.com/questions/63463/split-out-ints-from-string)... anyway, what I mean is stuff in <>. – Bluefire Jun 16 '12 at 12:40
  • @Bluefire - that's C#.net, not Java. – halfer Jun 16 '12 at 12:42
  • :O k sorry D: They look so similar! – Bluefire Jun 16 '12 at 12:43
  • Still, perfectly reasonable for someone to answer what Generics are in the context of Java, and it's application to any class type (in this case Integer) – BeRecursive Jun 16 '12 at 12:44
  • @azulflame: I don't care about rep, I care about helping the OP. I gave an answer (now deleted since I'm not happy about being insulted for it) that adressed the OP's issue, and am guilty only of taking a little while to embellish it with substance. Please don't be so quick to judge. – Mac Jun 16 '12 at 12:47
  • @DaveNewton: the "rep whore" term was bandied about. Truthfully, DaveRlz's comment above says much the same as my answer did, so the answer wasn't adding much to the conversation anyway (although it did come first). – Mac Jun 16 '12 at 12:54

0 Answers0