Re: io: how many imgs in 'images' folder?
- From: Lew <lew@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 29 Mar 2007 17:33:59 -0400
Eric Sosman wrote:
list() and listFiles() return arrays. You could use
them to populate a Vector or an ArrayList or whatever else
you like, if you think it would be fun.
ArrayList is probably a better choice than the hoary Vector class for a java.util.List implementation. You can always add synchronization to it using java.util.Collections.synchronized...() methods. Set might also be a suitable interface, since you likely will not need to list the same file twice in the collection.
Hash table?
java.util.HashMap is probably the better choice for a hash table (i.e., java.util.Map) implementation compared to java.util.Hashtable, with the same considerations as ArrayList vs. Vector.
-- Lew
.
- References:
- io: how many imgs in 'images' folder?
- From: maya
- Re: io: how many imgs in 'images' folder?
- From: Eric Sosman
- io: how many imgs in 'images' folder?
- Prev by Date: Netbeans 5.5 startup Errors
- Next by Date: Re: JSP problem..
- Previous by thread: Re: io: how many imgs in 'images' folder?
- Next by thread: Re: io: how many imgs in 'images' folder?
- Index(es):
Relevant Pages
|
|