I have a list of this sorts
List<Employee>emp = Arrays.asList(new Employee("Jack", 29), new Employee("Tom", 24));
class Employee {
private String name;
private Integer id;
}
I want to insert to Employee full name List as follows:
List<Employee>empFullName = Arrays.asList(new Employee("Jack Tom", 29));
class EmployeeFullName {
private String fullName;
private Integer id;
}
How can I merge the name fields in Employee to fullName in Employee List after combining the names? I want to use Java 8 for the solution.