What will be the result of compiling and running the following program? Select the one correct answer.

Question:

What will be the result of compiling and running the following program?

image text in transcribed

Select the one correct answer.

(a) The program will fail to compile.

(b) The program will compile, but will throw a ClassCastException at runtime.

(c) The program will compile, and print 0 when run.

(d) The program will compile, and print 1 when run.

(e) The program will compile, and print 2 when run.

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

Step by Step Answer:

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