Im trying to understand streams in java better, and im just trying to represent a nested for loop as a stream but im struggling to figure it out.
Ive tried a handful of things, but I cant seem to grasp it.
For example, something like this.
for (Profile profile : profiles) {
for (User user : users) {
if (user.getUserId().equals(profile.getProfileId())) {
profile.setField(false);
}
}
}
How would one do this as a stream in Java?