b*g 发帖数: 644 | 1 9. Mistyping the name of a method when overriding
Overriding allows programmers to replace a method's implementation
with new code. Overriding is a handy feature, and most OO programmers
make heavy use of it. If you use the AWT 1.1 event handling model,
you'll often override listener implementations to provide custom
functionality. One easy trap to fall into with overriding, is to mistype
the method name. If you mistype the name, you're no longer overriding a
method - you're creating an entirely |
|