41
What happens when you try to compile and run this application?
Answer (Choose 1 answer)
23. Object | myObjects = {
A. A ClassCastException occurs in line 31.
new Integer(12),new String("foo"),25.
24.
26.new Integer(5),
B. The value of all four objects prints in natural order.
27.new Boolean(true)
C. Compilation fails due to an error in line 23.
28. };29. java.util.Array.sort(myObjects);
D. Compilation fails due to an error in line 29.
30. for(int i=0; i<myObjects.length; i++) {
31.System.out.print(myObjects[i].toString());
32.System.out.print(" ");
33.}