You can only cast a reference type towards Object or towards its runtime type; since the runtime type of that object is Automobile, you are casting away from its runtime type.
A Car IS AN Automobile in your program, but there is no guarantee that an Automobile is a Car.
"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad:
Create Edit Print & Convert PDF Using Free API with Java