File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes <> signs in the constructor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "<> signs in the constructor" Watch "<> signs in the constructor" New topic

<> signs in the constructor

Mark Dalton

Joined: Nov 05, 2012
Posts: 2
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?

Steve Luke

Joined: Jan 28, 2003
Posts: 4181

Those are the Generic Type definitions. To understand them, a good place to start is The Generics Tutorial.

And welcome to the Ranch!

Jeff Verdegan

Joined: Jan 03, 2004
Posts: 6109

Hi, and welcome to the Ranch!

What you're seeing is a type parameter for Java's Generics mechanism:
Mark Dalton

Joined: Nov 05, 2012
Posts: 2
Thanks guys
I agree. Here's the link:
subject: <> signs in the constructor
jQuery in Action, 3rd edition