COMPLETE QUESTION:
What does this method do?
public static int foo(String [][] a)
{
int b = 0;
for (int i = 0; i<a.length; i++)
{
b++;
}
return b;
}
Answer:
Returns the value of b which is the dimension of the array
Explanation:
The method foo accepts a multi dimension array and returns the dimension of the array. A complete code implementation and call to the method is given below:
<em>public class TestClass {</em>
<em> public static void main(String[] args) {</em>
<em> String [ ] [ ] arr = {{"gh","hj","fg", "re","tr"},{"","er","df","fgt", "tr"}};</em>
<em> System.out.println(foo(arr));</em>
<em> }</em>
<em> public static int foo(String [ ][ ] a)</em>
<em> {</em>
<em> int b = 0;</em>
<em> for (int i = 0; i<a.length; i++)</em>
<em> {</em>
<em> b++;</em>
<em> }</em>
<em> return b;</em>
<em> }</em>
<em>}</em>
The output from the code snippet is the value of b which is 2
Answer:
because the urban landscape is the work of man
True but how may I help you?
Answer:
Guess the code
Explanation:
You are supposed to guess the code