Vector and Hashtable are just the synchronized versions of the ArrayList an HashMap but working much slower. Use unsynchronized collections unless thread-safety is really required.
Bad:
List l = new Vector();
for (...)
l.add(anObject);
Good:
List l = new ArrayList();
for (...)
l.add(anObject);
November 22, 2007 at 1:03 pm |
[...] ArrayList (or Vector if synchronization is required) for random-accessed [...]
March 3, 2009 at 11:56 am |
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru