File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes what do angle brackets mean? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "what do angle brackets mean?" Watch "what do angle brackets mean?" New topic
Author

what do angle brackets mean?

Daniel Loranz
Ranch Hand

Joined: Jun 17, 2008
Posts: 41
Where did syntax like HashMap<String, Integer> or Comparator<List<String>> come from and what does it mean? I think the HashMap example is telling me I can specify different Key, Value types. I'm not sure what the Comparator syntax is telling me.

I cannot find anything like this in any of the books I'm using ... the recommended van Linden book, the Head First Java, O'Rielly, ect.

Thanks.
- Dan

Looks like angle bracket may not show up correctly in this posting tool. I'll sub [ and ] for the angle brackets.

So .... syntax like HashMap[String, Integer] and Comparator[List[String]]
[ July 24, 2008: Message edited by: Daniel Loranz ]
Nathan Leniz
Ranch Hand

Joined: Nov 26, 2006
Posts: 132
This should help clear it up.

Link to a Sun pdf.

But I don't think I've seen just one angle bracket like that before, sorry, thought you meant two surrounding brackets.
[ July 24, 2008: Message edited by: Nathan Leniz ]

The very existence of flamethrowers proves that at some time, some where, some place, someone once said to themselves "I'd really like to set those people on fire over there, but I just can't get close enough".
Daniel Loranz
Ranch Hand

Joined: Jun 17, 2008
Posts: 41
Thanks - that looks helpful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what do angle brackets mean?