SyntaxFix
Write A Post
Hire A Developer
Questions
ClassA a = <something>; ClassB b = (ClassB) a;
The 2nd line will fail if ClassA is not a subclass of ClassB, and will throw a ClassCastException.