Just use this:

List<SomeBean> newList = new ArrayList<SomeBean>(otherList);

Note: still not thread safe, if you modify otherList from another thread, then you may want to make that otherList (and even newList) a CopyOnWriteArrayList, for instance -- or use a lock primitive, such as ReentrantReadWriteLock to serialize read/write access to whatever lists are concurrently accessed.

Answer from fge on Stack Overflow
🌐
Baeldung
baeldung.com › home › java › java list › copy a list to another list in java
Copy a List to Another List in Java | Baeldung
3 weeks ago - It’s important to keep in mind whenever using this method that, as with the constructor, the contents of both lists will reference the same objects. The Collections class consists exclusively of static methods that operate on, or return collections. One of them is copy, which needs a source list and a destination list that’s at least as long as the source.
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › util › List.html
List (Java Platform SE 8 )
July 21, 2026 - Java™ Platform Standard Ed. 8 ... AbstractList, AbstractSequentialList, ArrayList, AttributeList, CopyOnWriteArrayList, LinkedList, RoleList, RoleUnresolvedList, Stack, Vector ... An ordered collection (also known as a sequence). The user of this interface has precise control over where in the list each element is inserted.
🌐
GeeksforGeeks
geeksforgeeks.org › java › how-to-clone-a-list-in-java
How to Clone a List in Java? - GeeksforGeeks
Using the clone() method: Clone() ... To clone a list, one can iterate through the original list and use the clone method to copy all the list elements and use the add method to append them to the list....
Published: July 11, 2025
🌐
LinkedIn
linkedin.com › pulse › different-ways-copy-list-another-java-saral-saxena
Different Ways To Copy List To Another In Java
May 26, 2021 - Use the List constructor that takes in a collection as its argument. Just pass it another List object to create a new copy out of it. ... In this case, we are using a simple ArrayList class which implements the List interface.
🌐
Coderanch
coderanch.com › t › 755684 › java › copy-contents-reference-ArrayList
How to copy the contents and not the reference from one ArrayList to another? (Java in General forum at Coderanch)
November 10, 2022 - You will want to make a copy of the Person and put it in personListTemp. One way I might tackle it would be to create a new Person but provide a constructor that takes a Person with which it will use to populate its state. For example Instead of I might write For which I would need the following constructor in the Person class Of course by adding an explicit constructor Java will no longer add the default no argument constructor so you'll need to explicitly write one And to go one step further into the realms of good practice, make your Person object immutable by requiring all the state as constructor args and remove the setName(String name) method.
Find elsewhere
🌐
Medium
medium.com › codex › the-different-ways-to-copy-list-to-another-in-java-8db4ead985d8
5 Different Ways To Copy List To Another In Java | by Deddy Tandean | CodeX | Medium
August 21, 2021 - So, in this article, I will be talking about List, especially how to copy one List to another List. What is a List? A List is an ordered collection of objects in which duplicate values are allowed to be stored. It also preserves insertion order. There are multiple ways on how to copy a list to another list.
🌐
Stackademic
blog.stackademic.com › how-to-copy-a-list-to-another-list-in-java-simple-and-efficient-methods-79fad5fee389
How to Copy a List to Another List in Java: Simple and Efficient Methods | by M Business Solutions | Stackademic
December 9, 2024 - The simplest and most straightforward way to copy a list is by using the addAll() method, which adds all elements from one list to another.
🌐
W3Schools
w3schools.com › java › ref_arraylist_clone.asp
Java ArrayList clone() Method
The clone() method returns a copy of the ArrayList as an Object.
🌐
Oracle
docs.oracle.com › en › java › javase › 21 › docs › api › java.base › java › util › List.html
List (Java SE 21 & JDK 21)
January 20, 2026 - Package java.util · Type Parameters: E - the type of elements in this list · All Superinterfaces: Collection<E>, Iterable<E>, SequencedCollection<E> All Known Implementing Classes: AbstractList, AbstractSequentialList, ArrayList, AttributeList, CopyOnWriteArrayList, LinkedList, RoleList, RoleUnresolvedList, Stack, Vector ·
🌐
TutorialsPoint
tutorialspoint.com › article › how-to-copy-a-list-to-another-list-in-java
How to copy a list to another list in Java?
March 14, 2026 - Use Collections.copy() to copy elements into an existing destination list. The destination list must already have enough elements (they get overwritten by index) − ... import java.util.ArrayList; import java.util.Arrays; import java.util....
🌐
How to do in Java
howtodoinjava.com › home › collections framework › java arraylist › java arraylist clone() and deep copy example
Java ArrayList clone() and Deep Copy Example - HowToDoInJava
January 12, 2023 - In Java, the ArrayList clone() method creates a shallow copy of the list in which only object references are copied.
Top answer
1 of 16
135

b has a capacity of 3, but a size of 0. The fact that ArrayList has some sort of buffer capacity is an implementation detail - it's not part of the List interface, so Collections.copy(List, List) doesn't use it. It would be ugly for it to special-case ArrayList.

As tddmonkey has indicated, using the ArrayList constructor which takes a collection is the way to in the example provided.

For more complicated scenarios (which may well include your real code), you may find the collections within Guava useful.

2 of 16
130

Calling

List<String> b = new ArrayList<String>(a);

creates a shallow copy of a within b. All elements will exist within b in the exact same order that they were within a (assuming it had an order).

Similarly, calling

// note: instantiating with a.size() gives `b` enough capacity to hold everything
List<String> b = new ArrayList<String>(a.size());
Collections.copy(b, a);

also creates a shallow copy of a within b. If the first parameter, b, does not have enough capacity (not size) to contain all of a's elements, then it will throw an IndexOutOfBoundsException. The expectation is that no allocations will be required by Collections.copy to work, and if any are, then it throws that exception. It's an optimization to require the copied collection to be preallocated (b), but I generally do not think that the feature is worth it due to the required checks given the constructor-based alternatives like the one shown above that have no weird side effects.

To create a deep copy, the List, via either mechanism, would have to have intricate knowledge of the underlying type. In the case of Strings, which are immutable in Java (and .NET for that matter), you don't even need a deep copy. In the case of MySpecialObject, you need to know how to make a deep copy of it and that is not a generic operation.


Note: The originally accepted answer was the top result for Collections.copy in Google, and it was flat out wrong as pointed out in the comments.

🌐
Minecraft.net
help.minecraft.net › hc › en-us › articles › 32898740935181-Add-Friends-to-Your-Friend-List-in-Minecraft-Bedrock-Edition
Add Friends to Your Friend List in Minecraft: Bedrock Edition
Skip to main content · Back to homepage · Follow Minecraft · English (United States) · Español · Español de Mexico · Português Brasileiro · Indonesian · Consumer Health Privacy
🌐
Reddit
reddit.com › r/javahelp › how do i ‘copy’ lists that will only ever be edited slightly?
r/javahelp on Reddit: How do I ‘copy’ lists that will only ever be edited slightly?
March 19, 2018 -

I have a long list of objects. I need to be able to edit it slightly a few times and retain the previous versions.

Currently I am copying the whole list each time I need to make a change which is really arduous.

How can I ‘copy’ a list where under the hood I am just keeping a change log?

Top answer
1 of 2
2
As in anything related to programming there are probably dozens of different ways you could do it. A solution that occurs to me is to have the list contain not individual objects, but Lists of objects, the last one of which is the current revision. If you go that route you'd need a way to tie together which values belong to which revision of the list... But it would be fast and efficient, I think.
2 of 2
2
I'm not sure I fully understand what you're trying to do, but to some extent you might get what you want for free: You can copy a list by doing something like, e.g.: List copy = new ArrayList<>(original); copy will be a copy of original, and contains all the same elements as the original. Since the list actually contains references to the objects, rather than objects themselves, you haven't actually had to create copies of the objects, just the list. If by 'edit the list' you mean add and remove objects, then your copied list pretty much does exactly what you want. It starts off containing the references to the same objects as the original list and the only new objects that get created are any you create yourself to add to the list. However, if by 'edit the list' you mean making modifications to the objects in the list themselves, then since the objects in the two lists are actually really references to the same object, modifying an object in one list will modify it in the other too. I realise that this isn't quite what you asked, but if I haven't completely misunderstood then hopefully this is useful in assuring you that creating a copy of a list is not as wasteful as you might think. Alternatively, if you already fully understand the above and actually your lists are so large that you really do want to avoid a full copy then sorry for wasting your time!
🌐
Obsidian
obsidian.md › plugins
Obsidian Community
Syncs your vault to a local folder copy in seconds, and exports changes as a single transferable file you can carry on a USB drive.
🌐
Junit
docs.junit.org › 6.0.3 › overview.html
Overview :: JUnit User Guide
To see complete, working examples of projects that you can copy and experiment with, the junit-examples repository is a good place to start. The junit-examples repository hosts a collection of example projects based on JUnit Jupiter, JUnit Vintage, and other testing frameworks. You’ll find appropriate build scripts (e.g., build.gradle, pom.xml, etc.) in the example projects. The links below highlight some of the combinations you can choose from. For Gradle and Java, check out the junit-jupiter-starter-gradle project.
🌐
Coderanch
coderanch.com › t › 381289 › java › Copy-Portion-List
Copy a Portion of a List (Java in General forum at Coderanch)
Java in General · Alec Lee · Ranch Hand · Posts: 569 · posted 19 years ago · Number of slices to send: Optional 'thank-you' note: Send · What is the simplest way to create a List containing the ith element to the jth element of another List? Can it be done by a few statements without looping thru the list and copying the required elements one by one?