Thursday, June 7, 2007

Polymorphisms

Polymorphisms is the capability of an action or method to do different things based on the object that it is acting upon. method overloading , overriding and dynamic method binding. Overloading It happens in same Class. method name should be the same but argument and return type can change Overriding It happens in the derived Class with specif new definition should have same method name , argument and return type like the parent class. Dynamic Binding A mechanism by which, when the compiler can't determine which method implementation to use in advance, the runtime system (JVM) selects the appropriate method at runtime, based on the class of the object

0 Comments: