File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Implementation of Arrays.asList( .. ) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Implementation of Arrays.asList( .. )" Watch "Implementation of Arrays.asList( .. )" New topic
Author

Implementation of Arrays.asList( .. )

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

While dissecting the Arrays class, I noticed that the varags is type compatible with Collection<? extends E>.

I always thought of "a" as T[].
Any thoughts ?
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

Looks like I pulled the trigger a little too fast.
The ArrayList type is a custom subclass within Arrays.java.
 
 
subject: Implementation of Arrays.asList( .. )