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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Implementation of Arrays.asList( .. )" Watch "Implementation of Arrays.asList( .. )" New topic

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.
I agree. Here's the link: http://aspose.com/file-tools
subject: Implementation of Arrays.asList( .. )
Similar Threads
how to add an array to an ArrayList
Generic Method in K&B Question 14
get objects of the certain type from Collection
Generics question, related to K&B chapter 7 question 14
generic List type conversions