List<Student> finalList=new ArrayList<>();
list1.stream().forEach(z->{
list2.stream().filter(j->Objects.equals(z.getId(), j.getId())).findFirst().ifPresent(i->{
i.setName(z.getName());
i.setAge(z.getAge());
finalList.add(i);
});
});
how do I set the sequence number to I?