I was wondering if there is a way in java, when iterating through an array and placing values in certain indices, to skip an out of bounds exception and just go to the next item.
For instance,
for (int x = 0; x <= array.length; x++)
{
for (int y = 0; y <= array[0].length; x++)
{
// code that determines where to put things and in what indices
//if this index is out of the array bounds, I want to forget about it and keep going through the loops
}
}
}