checkIndices method Null safety
Implementation
void checkIndices(int row, int col) {
if (row < 0 || col < 0 || row >= rows || col >= columns) {
throw CalculatorError(3);
}
}
void checkIndices(int row, int col) {
if (row < 0 || col < 0 || row >= rows || col >= columns) {
throw CalculatorError(3);
}
}