title: Java 8 List copy
body: <p>I have an employee object </p>
  
  <p><strong>I Cannot update the employee Object</strong></p>
  
  <pre><code>public class Employee {
  
      public Employee(Integer id, Integer age, String gender, String fName, String lName) {
          this.id = id;
          this.age = age;
          this.gender = gender;
          this.firstName = fName;
          this.lastName = lName;
      }
  
      private Integer id;
      private Integer age;
      private String gender;
      private String firstName;
      private String lastName;
  </code></pre>
  
  <p>I am initially setting a employee list but want to create copy of that and then make changes to it. Even though I am creating new list its still changing the original list</p>
  
  <pre><code>public class ListTest {
  
      public static void main(String[] args) {
  
          List&lt;Employee&gt; employeeList = new ArrayList&lt;&gt;();
          Employee employee = new Employee(1, 1, "MALE", "TEST", "TEST");
          employeeList.add(employee);
  
          List&lt;Employee&gt; listTwo = new ArrayList&lt;&gt;();
          listTwo.addAll(employeeList);
  
          listTwo.get(0).setAge(11);
  
          System.out.println(employeeList.get(0).getAge());
  
      }
  }
  </code></pre>
  
  <p>The output is coming as 11. </p>
  
  <p>Is there any easier way to clone from original list and any changes should not be applied to original list object and just the new list I created </p>