Question 151 · 200 in bank
Given the code fragment:
What is the result?
Show answer
Answer: C
Explanation
C. This is a casting issue but the code fails to compile so the answer is c. The ClassCastException is a runtime exception where you're trying to cast an object to a different object type, but here the code fails to compile because you cannot cast a long to a string.
Source: Adapted from community discussion — theCloudCTO
