public class Employee {
Integer id;
String name;
}
I have a List of String containing the name of the employees.
i.e.
List<String> l = {"john","mike","jacky"};
I want to convert the String l
into the list of Employee where the name will be from list l
and if will be static 1 for each of them.
The final list should be like:
List<Employee> empList = ({1,"john"},{1,"mike"},{1,"jackey"})
How I can do it in java 8?