Results 1 to 4 of 4

Thread: Polymorphism.........

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Answers
    21

    Thumbs up Polymorphism.........

    What is Compile time polymorphism and Runtime polymorphism?


  2. #2
    Junior Member
    Join Date
    Sep 2006
    Answers
    9

    Re: Polymorphism.........

    the overloaded methods can be called compile time.... inheritance and virtual functions can be called as runtime polymorphism.
    Guys please start a discussion on this.
    Does any one have an idea on the various categories and varieties of polymorphism ?


  3. #3
    Contributing Member
    Join Date
    Sep 2006
    Answers
    962

    Re: Polymorphism.........

    Using method overloading u can acheive the compile time polymorphism. It means Compiler knows at the compile time which object assigned to which class.

    Using method overridding u can acheive the run time polymorphism. It means Compiler didn't know the compile time and it knows only at the run time.

    In our forum we already discuss about this one...If you want more details go through the following URL...

    Polymorphism

    ----------------------
    suresh


  4. #4
    Junior Member
    Join Date
    Sep 2007
    Answers
    1

    Re: Polymorphism.........

    Quote Originally Posted by Sampath_Java View Post
    What is Compile time polymorphism and Runtime polymorphism?
    Polymorphism refers to the similarity among several functions by the same name.However, the compiler makes the distinction among them either at the compile time (before the program is run) or at the run time(program has become a process). At compile time the distinction is made with the types and number of parameters the same name function has, as such its also called early binding. The Run time Polymorphism(binding) is done for the functions which are virtual,where the distinction can't be made on the basis of types or nume of functions and the base class pointer can refer to the derived class functions(same name).This is done with the help of Virtual Table.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact