Detection of collision between elements from same array only works sometimes

atm you compare every pair of circles double

instead use i+1 as start value

for (int k=i+1; k < circulos.length; k++) { //

This:

is not necessary then

2 Likes