Page 1 of 1

hi sir/madam, public String edit(Student stud) { student.stream().filter(e ->e.getStudentId() == stud.getStudentId()).fo

Posted: Thu Jul 14, 2022 2:12 pm
by answerhappygod
hi sir/madam,
public String edit(Student stud) {
student.stream().filter(e->e.getStudentId() == stud.getStudentId()).forEach(stud->{ e.setName(stud.getFirstName()); e.setName(stud.getLastName()); e.setDepartment(stud.getCourse()); e.setCountry(stud.getCountry()) }); return "updated";
Getting Error in line no-6 i.e. e.setCountry(stud.getCountry()) .pleasefind solution to my problem.