Can someone take a look at this. Create a method called findElement, which takes an integer value and a two-dimensional integer array as inputs and returns true if the value is in the array. If the value is not in the array, the method should return false.
This is what I have. Its not returing the correct answer.
public boolean findElement(int value, int[][] theArray){
int row = 0;
int col = 0;
for (row =0; row<theArray.length; row++){
for(col = 0; col<theArray[row].length; col++){
}
}
if (row == col)
return false;
else
return true;
}