例如,如果我想遍历一个矩阵并检查我所在位置周围位置的内容,有没有办法检查所有这些位置,并且如果其中一个或多个超出范围,它只是跳过那部分并继续?
matrix indexoutofboundsexception
indexoutofboundsexception ×1
matrix ×1