Question: What is the result of running the following program? Select the one correct answer. (a) When run, the program throws an ArrayIndexOutOfBoundsException. (b) When run,
What is the result of running the following program?
![public class OperandOrder { public static void main (String [] args) {](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1706/9/3/8/01965bdcea3269521706938016928.jpg)
Select the one correct answer.
(a) When run, the program throws an ArrayIndexOutOfBoundsException.
(b) When run, the program will print 9 9 6.
(c) When run, the program will print 9 0 6.
(d) When run, the program will print 9 3 6.
(e) When run, the program will print 9 3 9.
public class OperandOrder { public static void main (String [] args) { int i = 0; } int [] a (3, 6); = a [i]=i= 9; System.out.println (i + " " + a[0] + " " + a[1]);
Step by Step Solution
3.44 Rating (160 Votes )
There are 3 Steps involved in it
b The element referenced by ai is determined based on the current value of i which ... View full answer
Get step-by-step solutions from verified subject matter experts
