Given:
3. import java.io.*; 4. class Vehicle { } 5. class Wheels { } 6. class Car extends Vehicle implements Serializable { } 7. class Ford extends Car { } 8. class Dodge extends Car { 9. Wheels w = new Wheels(); 10. }
Instances of which class(es) can be serialized? (Choose all that apply.)
A and B are correct.
Dodge instances cannot be serialized because they "have" an instance of Wheels, which is not serializable.
Vehicle instances cannot be serialized even though the subclass Car can be.