Casting to a Panda will not work. What happens if the factory method returns a Monkey object? Obviously it cannot be cast to a Panda. Since a parent class has no idea about what subclasses there are...
Type: Posts; User: Junky
Casting to a Panda will not work. What happens if the factory method returns a Monkey object? Obviously it cannot be cast to a Panda. Since a parent class has no idea about what subclasses there are...