The API documentation of ConcurrentModificationException explains why: it is not allowed to change the content of a collection while you are iterating over it. That's what you are doing in the commented out line 18. You can only change the collection you're iterating over by calling methods in the iterator, such as the add method that you are calling in line 19.
I am sorry but i commented the wrong line . It was line 18 instead of 19 . And could you tell me that how exactly i make it ok ? Because when i use it1.add() , no elements are added to the collection .