Which statement about the following program is true? Select the one correct answer. (a) The program will

Question:

Which statement about the following program is true?

image text in transcribed

Select the one correct answer.

(a) The program will fail to compile because of the assignment at (1).

(b) When run, the program will throw a java.lang.ClassCastException in the assignment at (2).

(c) When run, the program will throw a java.lang.ClassCastException in the assignment at (3).

(d) The program will compile and run without errors, even if the cast operator (B[]) in the statements at (2) and (3) is removed.

(e) The program will compile and run without errors, but will not do so if the cast operator (B[]) in statements at (2) and (3) is removed.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: