Simran Dass wrote:
Cannot understand how the code in class B works. Why would we want to do this
Basically, you want to create a new class that IS-A a particular sub class, but you don't have the complete implementation. Or you have multiple possible implementations, of which the subclass implementation is not one of them.
Granted, it is not a common case, but it can happen.
Henry
This message was edited 1 time. Last update was at by Henry Wong
In what cases, such a scenario can happen? I find this quiet meaningless. Umm that too marking an instance method as abstract.
Doesn't it violate the rules of overriding?