Posts by Leander • 146 points
2 posts
-
7
votes4
answers47343
viewsA: Remove element from an Arraylist in Java
You can keep the code the way it is by changing only the class Pessoa. The problem, as quoted, is that you are trying to remove an object that is not equal to any other in the list. You can define…
-
6
votes1
answer551
viewsA: Iteration gives Concurrentmodificationexception error by including more than one button
The problem is that you are changing a collection you are iterating on (as in listaCercas.remove(1) and listaCercas.add(new Arbusto(this,660, 210))). In many cases it may happen that the iterator…