Multiple choice

What is the output of the given program?

public class ScopeTest

{

public static void main (String [] args)

{

int [] array = {1, 2, 3, 4, 5};

System.arraycopy (array, 2, array, 2);

System.out.print (array [1]);

System.out.print (array[4]);

}

}

  1. 35

  2. 25

  3. 24

  4. Run time error

  5. Compilation error

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

This answer is correct.