Solved

Consider the Following Code Snippet

Question 87

Multiple Choice

Consider the following code snippet:
If(anObject instanceof Auto)
{
Auto anAuto = (Auto) anObject;
) . .
}
What does this code do?


A) This code tests whether anObject was created from a superclass of Auto.
B) This code creates a subclass type object from a superclass type object.
C) This class safely converts an object of any type to an object of type Auto.
D) This code safely converts an object of type Auto or a subclass of Auto to an object of type Auto.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions