Discussion:surcharge

Une définition du Jargon Français.
Aller à : Navigation, rechercher

Attention, en anglais, on fait la différence entre deux définitions de "surcharge". La traduction n'est donc pas systématiquement "overloading" !!!

https://docs.google.com/viewer?a=v&q=cache:1eue0A7ODnYJ:www.cs.huji.ac.il/~noam/intro2cs2001/www/exercise_slides/ex10.ppt+&hl=en&pid=bl&srcid=ADGEESjPMFh6LDwRALvx2-gZPOtuBZsYwRvda30VDdyxWAEFkcM3j6rd8FBpWCWH_PfMwtYDASSl3bhUF_EHTFWfKePRePcG-ppmVN3eMqRS5SR0phH0TXPoArUSqhUZLV48pyDX3zkF&sig=AHIEtbR6GqLDeKH50pkE8cIbhdnEnt0HVA http://www.codeproject.com/KB/vista/Overload_Vs_Overriding.aspx http://www.jchq.net/certkey/0602certkey.htm http://www.janeg.ca/scjp/overload/poly.html

overloaded methods:

   appear in the same class or a subclass
   have the same name but,
   have different parameter lists, and,
   can have different return types 

overriding methods:

   appear in subclasses
   have the same name as a superclass method
   have the same parameter list as a superclass method
   have the same return type as as a superclass method
   the access modifier for the overriding method may not be more restrictive than the access modifier of the superclass method
   the throws clause of the overriding method may only include exceptions that can be thrown by the superclass method, including it's subclasses