ArrayList shallow copy iterate or clone()

Posted by user222164 on Stack Overflow See other posts from Stack Overflow or by user222164
Published on 2010-04-07T13:54:09Z Indexed on 2010/04/07 14:43 UTC
Read the original article Hit count: 135

Filed under:

I need a shallow copy of an java ArrayList, should I use clone() or iterate over original list and copy elements in to new arrayList, which is faster ?

© Stack Overflow or respective owner

Related posts about java