0

I was trying to understand the difference between forEach(..) method in java8 and forEach loop in older versions. As per my knowledge ConcurrentModificationException will not generate even when we use forEach loop from java5, so is there any performance overcome or any advantage if using forEach(..) method from java8. Please suggest.

0

1 Answer 1

0

I think the similar question has been already answered at

Java 8 Iterable.forEach() vs foreach loop

Please read the article, it has some good points.

Sign up to request clarification or add additional context in comments.

1 Comment

You can mark questions as duplicate by clicking on flag, then a duplicate and then searching for the duplicated.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.