Java Programming Fundamentals
Casual Mode - Take your time!
1 / 20
Correct
0
Incorrect
0
Score
0%
Multiple Choice
What will be the outcome of line no. 9 in the following program ? 1. public class SearchArray { 2. public static void main(String[] args) { 3. String[] strArr = {"one","two","three","four","five","six","seven"}; 4. boolean[] boolArr = {true,false,false,true,false}; 5. int[] intArr = {22,11,66,99}; 6. Arrays.sort(intArr); 7. for(int n=0; n<intArr.length; n++) 8. {System.out.println(n+". "+intArr[n]);} 9. System.out.println(Arrays.binarySearch(intArr,67)); 10. } 11. }
- -3
- 3
- -4
- 4