tags:

views:

185

answers:

3

What is

Type<Type> type;

called (opposed to)

Type type;

You know, where you put the angle brackets around the type? I use this a lot, but don't know the name - it's bugging me. It's very hard to search for - Google ignores the <> characters.

(note: this is Java)

+8  A: 

Generics! :)

Noon Silk
Thanks!
Isaac Waller
+1  A: 

Generics or parameterized types.

(Hey, two people already posted the same thing as each other and both got ~3 upvotes. I'm just looking for a share of the love.)

Imagist
Why are there 2 different names?
Isaac Waller
Why are there many names for a "car"?
Stephen C
Because I've seen both in usage, and I thought it might be helpful for the OP to know that they both mean the same thing. I also considered adding "templated types" since some C++ programmers call Java Generics that, but I decided not to because the differences (especially in how it's implemented) are significant.
Imagist