Question: What is printed in the output window when the code given below is compiled and run? public static void main (String[] args) int [ x-11,2);

What is printed in the output window when the code given below is compiled and run? public static void main (String[] args) int [ x-11,2); int [ y- plusOne (x) ; System.out.println (x [0"" x [1]) System.out.println (y[0] +""+ y1]) 20 121 public static int [ plusone (int [l x) int [] y = x; xnew int [x.length]; for int'1-0; icy. length; i++) { for (inti-o ; iy.length; ++) { return y
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
