Bookmark Topic Watch Topic
  • New Topic

Why does Collections.list(Enumeration<T> e) return ArrayList<T>?

 
Leon Omk
Ranch Hand
Posts: 75
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator


Isn't it better to return List<T> or Collection<T>? After all, we should code against interfaces, right?
 
Matthew Brown
Bartender
Posts: 4549
8
Java Netbeans IDE Scala
  • 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Duplicate of http://www.coderanch.com/t/557238/java/java/Why-does-Collections-list-Enumeration. Leon, can you avoid posting the same question to more than one thread? Thanks.

(I'll lock this one).
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic