(Choose 1 answer)
Given the following code fragment, what will happen when you try to compile and run the sho
1. public void printArray(long[] x ){
2. for(int i = 0; i <x.length; i++){
3. System.out.println("#" + i + "="+x[i]);
4. }
5.}
6. int[] small = {1,2,3,4,5,6,7,8,9,0};
7. public void showSmall() { 8. printArray(small);
9.}
A. The code will compile and the JVM will automatically promote the int array to a long array
B. The compiler will complain that there is no method matching the use in line 8.
C. The code will compile but a runtime ClassCastException will be thrown in line 8.
D. The code would work if you inserted a specific cast in line 8 as follows:
8. printArray( (long[]) small);
Exit 43