Question: This question refers to the following method: public static boolean isThere ( String [ ] [ ] mat, int row, int col, String symbol )
This question refers to the following method:
public static boolean isThereString mat, int row, int col,
String symbol
t
boolean yes;
int count ;
for ; SIZE;
if mat col equals symbol
count;
yes count as SIZE;
count ;
for ; SIZE;
mat row equals symbol
count;
return yes count SIZE;
Now consider this code segment:
public final int SIZE ;
String mat new String SIZESIZE ;
Which of the following conditions on a matrix mat of the type declared in the code segment will by itself guarantee that
isTheremat$
will have the value true when evaluated?
I The element in row and column is $
II All elements in both diagonals are $
III All elements in column are $
A I only
B III only
C I and II only
D I and III only
E II and III only
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
