Types of Polymorphism and definition

No comments


COMPILE TIME  POLYMORPHISM  :  The  polymorphism  concept  in  which  information  is  known  to  the  compiler  at  at  the  compile  time  and  therefore,  compiler  is  able  to  select  the  appropriate  function  for  a  particular  call  at  the  compile  time  itself  known  as  compile  time    Compile    time  polymorphism  also  known  as  early  binding  or  static  binding  or  static  linking.
In  Java  compile  time  polymorphism  may  implement  by  :

1. Function  Overloading

Function  Overloading  :  Overloading    refers  to  the  use  of  the  same  thing  for  different  purpose.  When  we  can  use  the  same  function  name  to  create  functions  that  perform  a  variety  of  different  task,  called  Function  polymorphism  or  Function  overloading.

               Using  the  concept  of  function  overloading  we  can  design  a  family  of  function  with  one  function  name  but  with  different  argument  list.

RUN TIME  POLYMORPHISM  :    The  polymorphism  concept  in  which  the  function  is  linked  with  a  particular  class  much  later  the  compilation,  known  as  RUN  TIME  POLYMORPHISM  OR LET  BINARY  OR  DYNAMIC   BINDING.

            In  java  run  time  polymorphism  concept  is  implementing  by  virtual  concept

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀