Imagine you find a problem with a method in a class you're using, but you don't have the source code.
So you can't modify the source to improve the method, but you can extend the class and override the method in your new subclass, and substitute the subclass everywhere the original super class is expected.
If the class is final, though, then you're stuck.
So you can't modify the source to improve the method, but you can extend the class and override the method in your new subclass, and substitute the subclass everywhere the original super class is expected.
If the class is final, though, then you're stuck.
No comments:
Post a Comment