public static boolean hasValue(int[][] arr, int value, int row)
{
int column = arr[row].length;
for (int i = 0; i < column; i++)
{
if (arr[row][i] == value)
return true;
}
return false;
}
It's a boolean method, so if the given value exist in a given row, it will say true. java.lang.ArrayIndexOutOfBoundsException: 4