CHAPTER 8
METHODS
244
While the resulting overloading clearly violates the guidelines in this item, it
causes no harm because both overloaded methods do exactly the same thing when
they are invoked on the same object reference. The programmer may not know
which overloading will be invoked, but it is of no consequence so long as they
behave identically. The standard way to ensure this behavior is to have the more
specific overloading forward to the more general:
Do'stlaringiz bilan baham: