Programming Homework Help
Programming Homework Help. Java : What is the output of the following program?
What is the output of the following program?
public class
ReferenceMystery1 {
public
static void main(String[] args) {
int
x = 0;
int[]
a = {0, 0, 0, 0};
x++;
mystery(x,
a);
System.out.println(x
+ ” ” + Arrays.toString(a));
}
public
static void mystery(int x, int[] a) {
x++;
a[x]
+= 1;
System.out.println(x
+ ” ” + Arrays.toString(a));
}
}
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"
![](https://courseworkgeeks.com/wp-content/uploads/2018/08/order_now-1.png)