Suppose class Square extends class Shape. Given the following code:
Square square = new Square(); Shape shape = new Shape();
Which lines compile without error? (Choose all that apply.)
B, C, D.
A cast is required when assigning from a superclass to a subclass, so A requires a cast but B does not.
The cast in C is required; the cast in D is not but does no harm.
The cast in E turns the right-hand side of the assignment into an Object, which may not be assigned to a Shape without a cast.