I have two Lists of objects
PersonList1 = (
Person(1, name),
Person(2, name),
Person(3, name),
Person(4, name),
Person(5, name),
Person(6, name),
Person(7, name),
Person(8, name),
Person(9, name),
Person(10, name)
);
PersonList2 = (
Person(5, name),
Person(7, name),
);
Need to go through first list and if its obj Id matches with one of the ids in List2, name value must be updated from List2 into List1.
How can i do it using streams instead of loops?