3

What are these called?

List<String> ids = new ArrayList<String>(sectionIDs);

( the part that is <> )

I know it's a newer java feature, I just cant think of the name.

4
  • its a list containing data type string, you can find more about generics in the links provided to you above "the part that is <>" its the part where you tell which data you want to be inside that list Commented Feb 8, 2010 at 13:13
  • The funny thing is, Java 5 is more than 5 years old, and to many people (myself included) generics still seem like a "newer" feature... Commented Feb 8, 2010 at 14:15
  • @Eli: That's because we're getting old. Anything invented since 1980 is "new". Commented Feb 8, 2010 at 14:33
  • I think this question has been posted once per day for the past week Commented Feb 8, 2010 at 14:56

6 Answers 6

10

Those are type parameters for generic classes.

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

Comments

2

It is called Generics

Comments

2

Java Generics

Comments

0

Generic classes, it exists already in C++ (if you didn't know).

1 Comment

or rather, something that quacks like a generic :)
0

They are java generics

Comments

0

Huh, I was going to say, "Those are letters and punctuation symbols. Can you make your question a little more specific?" But apparently a bunch of you figured out what it was he was looking for.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.