I've created a two-dimensional array that contains 5 rows and 5 columns. The array is an int type and have initialized with a value i*j. Already exists a method that takes a row number and value to search for.
private static Integer[][] myarray = new Integer[5][5];
public static boolean exists(int row, int value) {
if(row >= myarray.length) return false;
List<Integer> rowvalues = Arrays.asList(Arrays.asList(myarray).get(row));
if(rowvalues.contains(value)) return true;
return exists(row+1, value);
}