I am currently working on a student project and everytime I get this error: ArrayIndexOutOfBoundsException: 7. Can someone see where it occurs and how I can fix
ArrayIndexOutOfBoundsException: 7
if(c >= Playerlist.length) { c = 0; } else { c++; //ARRAY_INDEX_OUT_OF_BOUNDS ERROR !!!!!!!!!!!!!!!!!!!! while(wuerfelsummen[c] == null)
You are first checking if c is at most the last index of the array, and afterwards increment it by 1, possibly pushing it over that limit.