Casting references: compile-time check, runtime check
In one line: A cast changes only the reference type: the compiler rejects impossible casts and the JVM throws ClassCastException for wrong objects.
You’ve read your 2 free 1Z0-831 lessons
Sign up free to read every lesson — your progress is saved.