10k+ Downloads
(2.5k Reviews)


Inside this cheat sheet you will learn how to run profitable advertising campaigns. You will learn how to launch multiple campaigns and how to find the winning ones so you can scale them and squeeze all of the profit for your business.
Step1 :- Create Employee class
public class Employee {
private int id;
private String name;
private int age;
public Employee(int id, String name, int age) {
super(); this.id = id;
this.name = name;
this.age = age; }
public int getId() { return id; }
public void setId(int id) {
this.id = id;
}
public String getName() { return name; }
public void setName(String name) {
this.name = name;
}
public int getAge() { return age; }
public void setAge(int age) {
this.age = age;
}
@Override public String toString() {
return "Employee [id=" + id + ", name=" + name + ", age=" + age + "]";
}
}
Step2 :- Create EmployeeNameList class
public class EmployeeNameList {
public static void main(String[] args) {
List empList = Arrays.asList(new Employee(1,"Mannu",30),
new Employee(2,"Atul",30),
new Employee(3,"Asif",32),
new Employee(4,"Heera",32),
new Employee(5,"Manish",31));
List empNameList = empList.stream().map(e->e.getName()).collect(Collectors.toList()); empNameList.forEach(System.out::println);
}
}
Step1 :- Create Employee class
public class Employee {
private int id;
private String name;
private int age;
public Employee(int id, String name, int age) {
super(); this.id = id;
this.name = name;
this.age = age; }
public int getId() { return id; }
public void setId(int id) {
this.id = id;
}
public String getName() { return name; }
public void setName(String name) {
this.name = name;
}
public int getAge() { return age; }
public void setAge(int age) {
this.age = age;
}
@Override public String toString() {
return "Employee [id=" + id + ", name=" + name + ", age=" + age + "]";
}
}
Step2 :- Create EmployeeNameList class
public class EmployeeNameList {
public static void main(String[] args) {
List empList = Arrays.asList(new Employee(1,"Mannu",30),
new Employee(2,"Atul",30),
new Employee(3,"Asif",32),
new Employee(4,"Heera",32),
new Employee(5,"Manish",31));
List empNameList = empList.stream().map(e->e.getName()).collect(Collectors.toList()); empNameList.forEach(System.out::println);
}
}
Minutes