[Solved] I confused with the error when i wrote the code like short a = 1;a=a (short)1; [closed]
You can better try with: a= (short)1; instead of a=a (short)1; ClassCastException is:- Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. Although in your code it is not making sense how you receive the ClassCastException even after if we change as … Read more