public class Array1{
int[] Ki[]=new int[9][];
public int guessWhat( int arr[] ){
int x= 0;
for( int i = 0; i < arr.length; i++ ){
x = x < arr[i] ? arr[i] : x;
System.out.println(x);
}
return x;
}
public static void main(
String args[]){
Array1 a=new Array1();
System.out.println(a.guessWhat(new int[9]));
}
}
/*
a) Returns the index of the highest element in the array
b) Returns true/false if there are any elements that repeat in the array
c) Returns how many even numbers are in the array
d) Returns the highest element in the array
e) Returns the number of question marks in the array
20. Which of the following are legal declarations of a two-dimensional array of integers?
Can anyone tell me which one is the correct answer (with detailed explanations)for the above code.
Thanks
sudha