Related Links:nJacob De Haan Ross Roy Pdf Download Call Of Duty Black Ops . Related Links:nJacob De Haan Ross Roy Pdf Download Call Of Duty Black Ops. Related Links:nJacob De Haan Ross Roy Pdf Download Call Of Duty Black Ops Related Links:Q:
finally block is never executed
I am trying to handle ConcurrentModificationException with finally block but it's always not executed.
It's not executing the code written inside finally block.
Any idea why?
Here is the code:
import java.util.List;
public class Foo {
private List items;
public Foo() {
items = new ArrayList();
items.add("a");
items.add("b");
items.add("c");
items.add("d");
items.add("e");
}
public void add(String item) {
items.add(item);
public void addMany(List items) {
items.forEach(this::add);
public List getItems() {
return items;
}
public class TestFoo {
public static void main(String[] args) {
Foo foo = new Foo();
foo.add("h");
foo.add("g");
foo.addMany(new ArrayList());
foo.add("f");
foo.
Related links:
Comments