📜  java代码示例中的列表克隆

📅  最后修改于: 2022-03-11 14:52:27.750000             🧑  作者: Mango

代码示例1
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
  
class Example {
    public static void main(String[] args)
    {
        // Create a list
        List original
            = Arrays.asList(
                "GeeksForGeeks",
                "A Computer Science",
                "Portal");
  
        // Clone the list
        List cloned_list
            = new ArrayList(original);
  
        System.out.println(cloned_list);
    }
}