Why would you want to clone? Creating a new list usually makes more sense.
List<String> strs;
...
List<String> newStrs = new ArrayList<>(strs);
Job done.
More Related Contents:
- How do I find out what type each object is in a ArrayList?
- Java Generic with ArrayList
- new ArrayList() failing in Java
- Java generics – ArrayList initialization
- Why does the ArrayList implementation use Object[]?
- ArrayList Generic without Type
- ArrayList Data Structure – Daily Temperature
- What’s the reason I can’t create generic array types in Java?
- Instantiating a generic class in Java [duplicate]
- Clone() vs Copy constructor- which is recommended in java [duplicate]
- Which Java Collection should I use?
- Generic array creation error
- Why won’t this generic java code compile?
- Why start an ArrayList with an initial capacity?
- Performance of traditional for loop vs Iterator/foreach in Java
- Difference between generic type and wildcard type
- How to get the last value of an ArrayList
- Firebase Firestore get data from collection
- Java – Removing duplicates in an ArrayList
- Creating new generic object with wildcard
- Get specific ArrayList item
- Best way to create a hashmap of arraylist
- Whats the use of saying
- How do I populate a JComboBox with an ArrayList?
- Can I use generics over reference types only?
- String gets assigned to a List without a compilation error [duplicate]
- Clone method for Java arrays
- Can you pass an int array to a generic method in java?
- How can I create an array in Kotlin like in Java by just providing a size?
- Vector vs Collections.synchronizedList(ArrayList)