| Author |
<> signs in the constructor
|
Mark Dalton
Greenhorn
Joined: Nov 05, 2012
Posts: 2
|
|
Hey!
First of all I want to say that I am quite new at java. Recently I've been reading java docs and found out this type of constructor: "ArrayList(Collection<? extends E> c)". I have been unable to figure it out on my own. Could somebody please explain me what does this means exactly or point me to a place where I could read more about it?
Regards,
BXC
|
 |
Steve Luke
Bartender
Joined: Jan 28, 2003
Posts: 3028
|
|
Those are the Generic Type definitions. To understand them, a good place to start is The Generics Tutorial.
And welcome to the Ranch!
|
Steve
|
 |
Jeff Verdegan
Bartender
Joined: Jan 03, 2004
Posts: 5836
|
|
Hi, and welcome to the Ranch!
What you're seeing is a type parameter for Java's Generics mechanism: http://docs.oracle.com/javase/tutorial/java/generics/
|
 |
Mark Dalton
Greenhorn
Joined: Nov 05, 2012
Posts: 2
|
|
Thanks guys
|
 |
 |
|
|
subject: <> signs in the constructor
|
|
|