String input from keyboard
Vector<String> myVector = new Vector<String>(someArray.length); //assume Vector is populated
Iterator<String> itr = myVector.iterator();
for loop begins
while(itr.hasNext() && itr.next().equals(input)){
itr.remove();
}
...
while(itr.hasNext() // is this the problem source?
run more code
for loop ends
when the current element equals to a string input, i want to remove that element, otherwise continue iterating. i keep getting concurrent exceptions here.
what else should i do? should i be moving my itr.next elsewhere?
QUESTION: i want the logic such that if the current Vector element equals to target, i want it removed from the Vector. how can i do that?
itras it's likely that what you are omitting is the problem