I thought I understood when a subclass method could override that of its parent class method if the signature's were the same, however I have just seen an example of the opposite and I am freaked out.
example:
reply calls processRequest from it's subclass, how can this be, how does it know about the method in its subclass? why isnt it calling the processrequest in its own class. I could understand if it was a subclass but its a parent class. also, if this is normal what if there were other subclasses that had the same method signature, how the heck would the parent class know which subclass method to call????
Thanks
example:
Code:
parentclass (){
somemethod(){
reply = processRequest( request ){
}
protected processRequest( E_Message request ){
}
}
...
subclass extends parentclass(){
protected processRequest( E_Message request ){
}
}
Thanks