4

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)

3 Answers 3

13

Generics! :)

Sign up to request clarification or add additional context in comments.

Comments

9

Generics: http://java.sun.com/j2se/1.5.0/docs/guide/language/generics.html

Comments

3

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

2 Comments

Why are there 2 different names?
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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.