We are testing interview quizzes and created a demo app. Now, We require your help. Please take this quiz and provide inputs for content improvement. Interview Quiz




Interview Series: Polymorphism Question- Answer Updated


We are sharing our third question of the series in the form of comic, Please help our kid in the comic by sharing your answers through comments or Facebook  or Google plus or twitter[@CodeSpreadBlog]. We have selected answers from Gaurav and Swati as they both were correct. Thanks Guys!

Go Back! you don't even know the different ways to achieve polymorphism. | Mumma!!

Polymorphism Question @Pixton

Polymorphism can be achieved through method,operator overloading.The fundamental idea of polymorphism is that a compiler doesnt know which method to call during the compile time. It only knows during run time this is polymorphism by inheritance.

Answer by Gaurav @Pixton

Basically, polymorphism is categorised into 2 parts,i.e,compile time and run time. Compile time polymorphism can be achieved by 2 ways function overloading and operator overloading but in java operator overloading is not used. Runtime polymorphism can be achieved by function overriding.

Answer by Swati @Pixton

Good Luck for the next one!!!

Navigation:





3 Responses to Interview Series: Polymorphism Question- Answer Updated

  1. GAURAV RAJ says:

    Polymorphism can be achieved through method,operator overloading.The fundamental idea of polymorphism is that a compiler doesnt know which method to call during the compile time. It only knows during run time this is polymorphism by inheritance.
    pls correct me if I’m wrong or get the question wrong.. :)

  2. Swati Sharma says:

    Polymorphism can b achieved via functionalities only. Basically, polymorphism is categorised into 2 parts,i.e,compile time and run time.
    Compile time polymorphism can be achieved by 2 ways function overloading and operator overloading but in java operator overloading is not used.
    Runtime polymorphism can be achieved by function overriding.