Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<> signs in the constructor

 
Mark Dalton
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4181
21
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic