Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementation of Arrays.asList( .. )

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like I pulled the trigger a little too fast.
The ArrayList type is a custom subclass within Arrays.java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic